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

Internal cross reference to a section title starting with a backtick #3678

Open
stenzengel opened this issue Jun 9, 2020 · 0 comments
Open

Comments

@stenzengel
Copy link

If a section title starts with a backtick, a cross reference to it is not resolved and no warning is emitted.

Example:

= Test
:attribute-missing: warn

== `String`

== Class `String`

== Referencing Section

<<`String`>>
<<Class `String`>>
<<Unexisting>>

Current behavior:

The generated HTML for the "Referencing Section" looks like this:

<p>&lt;&lt;`String`&gt;&gt;
<a href="#_class_string">Class <code>String</code></a>
<a href="#Unexisting">[Unexisting]</a></p>

I.e. the cross reference to the section starting with a backtick is not interpreted and no link tag is created.

Asciidoctor only emits the info message for the reference to "Unexisting":

asciidoctor: INFO: possible invalid reference: Unexisting

Expected behavior:

Preferred solution: The reference is interpreted and an a tag is created
Alternative: An info message is created (as for "Unexisting")

I'm not sure if this is an error, or if this is intended behavior. Perhaps there is another way to reference a section title starting with a backtick? I know about referencing by ID, but in this case I prefer referencing by title.

This issue seems to be different than #3642, because backticks in titles seem to work in general: Referencing the other section containing backticks (but not starting with backticks) works correctly.

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

No branches or pull requests

1 participant