KEMBAR78
Fix asciidoc figure with empty title by Maneren · Pull Request #10047 · jgm/pandoc · GitHub
Skip to content

Conversation

@Maneren
Copy link

@Maneren Maneren commented Aug 1, 2024

I ran into this when converting from docbook's informalfigure (that is a figure without a title) to asciidoc.

For this input presented as example in docbook docs

<informalfigure>
  <mediaobject>
    <imageobject>
      <imagedata fileref="watarun.eps"/>
    </imageobject>
  </mediaobject>
</informalfigure>

the output includes extra leading . that would precede a title but is invalid alone.

.
image::watarun.eps[watarun]

In this PR I added a simple if check for empty title so it correctly outputs

image::watarun.eps[watarun]

@jgm jgm closed this in 3d0faf6 Aug 1, 2024
@jgm
Copy link
Owner

jgm commented Aug 1, 2024

Apologies! I didn't notice that this was a pull request -- I took it to be an issue, and I fixed it myself. Your PR was perfectly good, though. I'm sorry for not noticing that.

@Maneren
Copy link
Author

Maneren commented Aug 1, 2024

LMAO. No problem at all.

I started writing an issue but looked at the code and figured it's this simple, so the description very much reads like an issue at the first glace.

Anyway, thank you for such quick response and glad it's fixed :D

christopherkenny pushed a commit to christopherkenny/pandoc that referenced this pull request May 23, 2025
christopherkenny pushed a commit to christopherkenny/pandoc that referenced this pull request May 23, 2025
jgm added a commit that referenced this pull request Aug 17, 2025
due to automatic wrapping.

Also simplify existing code that was meant to do this.

Closes #10047.
jgm added a commit that referenced this pull request Aug 17, 2025
Commit 2c857d3 closed #11047 but was mislabeled as closing #10047.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants