-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary backslash #1979
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using this throughout the guide it seems (with the backslash at the end) for images. Unfortunately I cannot recall why. Usually this would be a line break. Let's keep it for now and raise a ticket, as this might be some workaround for the document build pipeline
@sushi2k I found the commit where those backslashes where added: https://github.com/OWASP/owasp-mstg/blob/707b1f7b2a0f516ab76be3607c355daf85b647a3/Document/0x02-Frontispiece.md "fixed issue with captions in epub and docx" Do you recall what was happening without them? |
I assume this is why: https://pandoc.org/MANUAL.html#images See "Extension: implicit_figures" If you just want a regular inline image, just make sure it is not the only thing in the paragraph. One way to do this is to insert a nonbreaking space after the image:
![This image won't be a figure](/url/of/image.png)\ We still have the issue that the images do not have a <img href="file.jpg" style="width: 50%;" alt="some caption"/> and, right before giving it to pandocker, we have a short script converting those to: ![some caption](file.jpg){ width=50% } Having HTML imgs in the original document means that markdown renderers will render them properly including width. And then pandocker will take care of converting the markdown to whatever other format because we use the official supported syntax from pandoc markdown extension. |
@TheDauntless see my last comment, I've introduced that in #2059 tools/docker/pandoc_makedocs.sh will run tools/docker/imagereplace.sed so we can input HTML imgs now. So maybe this PR should remove all those backslashes and convert the images to HTML including a width. For this we have to review the PDF, since some images will be ok but others are for instance extremely big. |
As this one was pretty outdated, I continued in a new branch, so closing this one. See #2126 for follow up. |
Very tiny fix