Skip to content
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

Surrounding text in content key of running content is dropped if image macro is on its own line #2495

Closed
mojavelinux opened this issue Feb 15, 2024 · 0 comments
Assignees
Milestone

Comments

@mojavelinux
Copy link
Member

If the image macro is placed on a line by itself in the content key of the running content (header or footer), the converter is ignoring the surrounding text and treating the content as a block image.

footer:
  recto:
    left:
      content: |
        this text is dropped +
        image:logo.png[fit=line]

This is happening because the converter is looking for an isolated image macro (to treat as a block image) per line instead of across the whole value. When it finds the image macro on a line by itself, it mistakenly assumes it's the only content. That's why the text is dropped.

The workaround is to put an attribute reference in front of (or after) the macro to disrupt the match.

footer:
  recto:
    left:
      content: |
        this text is not dropped +
        {empty}image:logo.png[fit=line]
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Feb 15, 2024
@mojavelinux mojavelinux self-assigned this Feb 15, 2024
@mojavelinux mojavelinux added this to the v2.3.x milestone Feb 15, 2024
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Feb 15, 2024
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Feb 15, 2024
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Feb 16, 2024
mojavelinux added a commit that referenced this issue Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant