Respec: Short syntax to link to fragment inside other spec

Created on 9 Jan 2020  路  7Comments  路  Source: w3c/respec

Important info

Description of problem

What happened?:

The syntax <a data-cite="?HTML/webstorage.html#user-tracking">[HTML#user-tracking]</a> links to a fragment inside the HTML spec, but [[[?HTML/webstorage.html#user-tracking]]] does not.

But what I was expecting?:

[[[spec#frag]]] or [[spec#frag]] interprets its content like a data-cite attribute.

Feature request

Most helpful comment

so unfortunately we don't support this yet, but we are exploring how to add it on the Respec.org server/service. Will leave this open for now.

All 7 comments

The [[[expand]]] syntax presently only works for spec names and local anchors, as we already have their textContent values.
What should be the textContent in this case?

I don't have a strong opinion: it's a stylistic choice, just like the choice to render [[expand]] as "[expand]". I used "[HTML#user-tracking]" as the text content, omitting the "/webstorage.html", but including it would be fine with me.

Wouldn't the inverse be a better option where author specifies the text and ReSpec appropriately links? We already support this for definitions and IDL, we can extend support for other terms as well.

Also, how about [[[ expand | optionalTextContent ]]]? I'm not sure if it's better than data-cite syntax though.
We already support [= link term | textContent =] for definitions.

Supporting [[[?HTML/webstorage.html#user-tracking]]] (with implied text content of "[HTML/webstorage.html#user-tracking]") and [[[?HTML/webstorage.html#user-tracking | replacement text content]]] would be fine with me. I would be sad if the | replacement text content were required.

For reference, Bikeshed's similar feature is described at https://tabatkins.github.io/bikeshed/#section-links.

so unfortunately we don't support this yet, but we are exploring how to add it on the Respec.org server/service. Will leave this open for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saschanaz picture saschanaz  路  5Comments

saschanaz picture saschanaz  路  3Comments

saschanaz picture saschanaz  路  6Comments

jnurthen picture jnurthen  路  6Comments

marcoscaceres picture marcoscaceres  路  6Comments