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

Put id on phrase instead of as anchor in HTML output #2445

Closed
mojavelinux opened this issue Oct 8, 2017 · 2 comments
Closed

Put id on phrase instead of as anchor in HTML output #2445

mojavelinux opened this issue Oct 8, 2017 · 2 comments
Assignees
Milestone

Comments

@mojavelinux
Copy link
Member

mojavelinux commented Oct 8, 2017

When an ID is assigned to a phrase (span of formatted text), put the the id attribute on the tag that encloses the phrase instead of as an anchor before it.

Example:

[#bond]_007_

Output:

<em id="bond">007</em>

instead of:

<a id="bond"></a><em>007</em>

The proposed output is the more intuitive result.

@mojavelinux mojavelinux added this to the v1.5.7 milestone Oct 8, 2017
@mojavelinux mojavelinux self-assigned this Oct 8, 2017
@mojavelinux
Copy link
Member Author

Open question: Should this change be applied to the DocBook output too?

mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Oct 8, 2017
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Oct 8, 2017
@mojavelinux
Copy link
Member Author

I'm reluctant to add this to the DocBook output since the following is not supported by the dblatex XSL:

<phrase xml:id="anchor" xreflabel="text">text</phase>

The XSL stylesheet does not output the following as it should:

\label{anchor}\hyperlabel{anchor}%

This is due to a missing call to the label.id template in the phrase template.

Chances are, this feature is going to be more useful for HTML anyway, so we'll just start with the change there.

mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Oct 17, 2017
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