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

xrefstyle is not honored when displaying xrefs #889

Open
r0ckarong opened this issue Jun 21, 2024 · 2 comments
Open

xrefstyle is not honored when displaying xrefs #889

r0ckarong opened this issue Jun 21, 2024 · 2 comments

Comments

@r0ckarong
Copy link
Contributor

I was trying to help with this discussion and tested the behavior in my VSCode.

This example was provided by Dan to show how to do it but in my VSCode it wouldn't work right.

= Document Title
:xrefstyle: short

See <<my-table>> for more reference.

.Title of my table
[#my-table]
|===
|data
|===

What I would expect to see is "Table 1" as the link text. I get the text from the auto-id instead.

image

The browser extension shows it correctly:

image

@r0ckarong
Copy link
Contributor Author

Explicitly setting the xref as macro with the style "short" doesn't work either:

image

= Document Title
:xrefstyle: short

See <<my-table>> for more reference.

See xref:my-table[xrefstyle=short] for more reference.

.Title of my table
[#my-table]
|===
|data
|===

@ggrossetie
Copy link
Member

Also related to #853 where we are using a custom converter for xref to support link (href) in the preview.

Basically, we don't support all the xref features and we need to implement them in the asciidoctorWebViewConverter. Feel free to open a pull request to implement the missing features. You can take a look at: https://github.com/asciidoctor/asciidoctor/blob/e070613f0932b18cfb64370a8f0b6a0831eee4cd/lib/asciidoctor/converter/html5.rb#L1131-L1154

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

2 participants