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

indexterm doesn't work if text contains = #3652

Closed
stallio opened this issue May 14, 2020 · 1 comment
Closed

indexterm doesn't work if text contains = #3652

stallio opened this issue May 14, 2020 · 1 comment
Assignees
Labels
bug v2.0.21 Issues resolved in the 2.0.21 release
Milestone

Comments

@stallio
Copy link

stallio commented May 14, 2020

The indexterm macro and triple-parenthesis macro return different results if any of the terms to be indexed contain an equals sign.

The triple-parenthesis form does what I expect it to, but indexterm: does not.

Here is my test file:

= index test

indexterm:[index1, id=indexo]

(((index1, id=indexo)))

indexterm:[id=indexo, index2]

(((id=indexo, index2)))

indexterm:["id=indexo", index2]

((("id=indexo", index2)))

The top two should return the same result, and the bottom four should return the same result. But here is what I get when I convert to Docbook 5:

<simpara><indexterm>
<primary>index1</primary>
</indexterm></simpara>

<simpara><indexterm>
<primary>index1</primary><secondary>id=indexo</secondary>
</indexterm></simpara>

<simpara><indexterm>
<primary>i</primary><secondary>d</secondary><tertiary>=</tertiary>
</indexterm></simpara>

<simpara><indexterm>
<primary>id=indexo</primary><secondary>index2</secondary>
</indexterm></simpara>

<simpara><indexterm>
<primary>id=indexo</primary><secondary>index2</secondary>
</indexterm></simpara>

<simpara><indexterm>
<primary>id=indexo</primary><secondary>index2</secondary>
</indexterm></simpara>

If the second term (or any subsequent term) contains =, it disappears. If the first term contains =, then it gets split by character.

mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Nov 2, 2023
…term macro when primary term is quoted and contains =
@mojavelinux
Copy link
Member

You are right. This was broken when #2047 was implemented. In that case that named attributes are detected, it was only considering the first term. I've submitted a PR to fix it.

This fix should be backported to 2.0.x.

@mojavelinux mojavelinux self-assigned this Nov 2, 2023
@mojavelinux mojavelinux added the bug label Nov 2, 2023
@mojavelinux mojavelinux added this to the v2.0.x milestone Nov 2, 2023
mojavelinux added a commit that referenced this issue Nov 26, 2023
…when primary term is quoted and contains = (PR #4511)
@mojavelinux mojavelinux added the v2.0.21 Issues resolved in the 2.0.21 release label Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug v2.0.21 Issues resolved in the 2.0.21 release
Projects
None yet
Development

No branches or pull requests

2 participants