-
-
Notifications
You must be signed in to change notification settings - Fork 788
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
wrong translation of index terms inside parenthesis in DocBook backend #1581
Comments
This bug is present in AsciiDoc Python too, so it looks like we inherited it. The workaround is to insert a zero-width space before the last
|
In this case, I'd probably recommend the use of the
When using the parenthetical form, it can be hard to determine the boundaries when adjacent to a parenthesis in the content. I'll see if I can find a way, but we'll have to see. |
Thanks! I can see it is now scheduled for v1.5.5 so waiting is probably the best strategy for most of us. |
I was able to work out how to solve this. We just needed to check more carefully about which surrounding brackets were captured. |
…getting caught in indexterm
…tting caught in indexterm - check for captured leading and trailing brackets more carefully - strip brackets that are not part of term and restore when converting text - consolidate code to reduce redundant conditionals - use slice with fixed positions when taking substrings
…tting caught in indexterm - check for captured leading and trailing brackets more carefully - strip brackets that are not part of term and restore when converting text - consolidate code to reduce redundant conditionals - use slice with fixed positions when taking substrings
…tting caught in indexterm - check for captured leading and trailing brackets more carefully - strip brackets that are not part of term and restore when converting text - consolidate code to reduce redundant conditionals - use slice with fixed positions when taking substrings
I think this is not entirely fixed, when I have the following doc = Test
Author
Version
:doctype: book
== chapter 1
test (((Index1)) is not hidden) but ((((Index2)))Index 2 is)
[index]
== Index the followng result can be seen in the PDF:
Instead of "test (Index1 is not hidden) but (Index 2 is)" with "Index2, 1" I see this with asciidoctor.maven.plugin.version 1.5.5, asciidoctorj.version 1.5.6 and <asciidoctorj.pdf.version 1.5.0-alpha.15 on java 8u141 with jruby 9.1.8.0 on Win10 with Maven 3.5.0 |
I should be clear. There are going to be exceptions. The round bracket form a convenient short-hand. The regular-expression based parser simply doesn't have enough context to sort out what is content and what is markup when the content contains lots of round brackets. We shoot for making the most common cases work. Fo all others, I highly recommend the more definitive indexterm/indexterm2 macro. |
I understand it is not always possible, one improvement would be to not count ( or ) to the indexterm ever (unless inside quotes) can't imagine a situation where this would be desired |
This:
translates to:
please note the extra
)
in the index term.The text was updated successfully, but these errors were encountered: