-
Notifications
You must be signed in to change notification settings - Fork 7
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
Cross-reference :xrefstyle:
attribute and [reftext=""]
attributes are ignored
#25
Comments
Have you got an RFD published with xrefs that I could take a look at? |
Sure! Take a look at Section 5.1 and Section 5.2 of RFD 121 Power Shelf Controller. Those are the only sections I've put xrefs in so far. |
Ooh, interesting! Thanks for taking a look at this so quickly. |
Could it be a browser issue? I'm on Firefox 114.0.2 (64-bit) |
Unlikely, i'm running a chromium browser and the first render should be done server-side anyway. Looking into any discrepancies between the node and asciidoctor versions now. |
So @augustuswm managed to fix this with a redeploy — and we're still non the wiser as to why it's working now. I'm not too clued up on Also worth saying that you can't necessarily rely on all attributes being customisable. Some we set ourselves in the backend, though no |
I tried |
Scratch that - |
Apologies for letting this fall off my radar - I'm back in RFD-land, and the RFD site appears to still not be handling |
We've moved to our own AsciiDoc renderer now, so things might have broken in new fun ways: https://github.com/oxidecomputer/react-asciidoc Are you defining that attribute at the beginning of the document? |
Yep - I define the attribute at the beginning of the document. Here's the macros for the RFD I'm working in right now:
Nothing out of the ordinary here as far as I know. |
I'll take a look! I would note that the site might override some of these – for example In theory at the inline text level we hand it back to |
I also seem to have been hit by this one in RFD 520, where I've used the This works as expected in However, it doesn't appear to be honored by the RFD site: This isn't the end of the world, but I figured I'd mention it, since the issue seems to still exist. |
So at some point the Not to say that the current setting is correct. The shorter version might be fine because xrefs are internal (I'm fairly sure any external ones would not work). What do you think? |
So, I agree that the RFDs should all be formatted as consistently as possible --- that's actually why I was trying to set the For what it's worth, if we search the RFD repo for RFDs that attempt to set an |
Incidentally, it occurs to me that it would be cool to have a macro for referencing sections in other RFDs that automatically Does The Right Thing...but I imagine that other asciidoc renderers might choke on that, so maybe it's a non-starter? |
I'm thinking we could default to the short xrefstyle and use a popover to show the full context. Related to #68 |
The RFD site appears to ignore the
xrefstyle
cross-reference style attribute for both the global document attribute (e.g.,:xrefstyle:
) and in inline cross reference macros (e.g.,xref:installation[xrefstyle=short]
).Additionally, the RFD site appears to ignore the
reftext
attribute (e.g.,[reftext="Installation"]
).In both cases, creating a cross reference displays the full ID of the target section, table, or figure, enclosed in square brackets, regardless of style attribute. This prevents us from creating cross references that just say "Table X" or "Section X".
Example: My document specifies the
:xrefstyle: short
attribute. I create the following table:I create the following cross-reference:
The cross-reference should render as
Instead, the cross-reference renders as:
This behavior is the same for all
xrefstyle
options.The text was updated successfully, but these errors were encountered: