mmarkdown / mmark

Mmark: a powerful markdown processor in Go geared towards the IETF
https://mmark.miek.nl
Other
480 stars 45 forks source link

Use of anchor or id for referencing #189

Closed ktmf01 closed 1 year ago

ktmf01 commented 1 year ago

Following #173, I tried to reference a table. It seems the following should be possible

{id="myid"}
---|---
 a | b
 d | d

Please refer to table (#myid, use counter)

However, xml2rfc complains

Error: IDREF attribute target references an unknown ID "myid", at None

The following however, works

{anchor="myid"}
---|---
 a | b
 d | d

Please refer to table (#myid, use counter)

I'm not sure whether this is a documentation or implementation problem, or whether I'm doing something else wrong.

miekg commented 1 year ago

[ Quoting @.***> in "[mmarkdown/mmark] Use of anchor or ..." ]

Following #173, I tried to reference a table. It seems the following should be possible

{id="myid"} ---|--- a | b d | d

Please refer to table (#myid, use counter)

However, xml2rfc complains

Error: IDREF attribute target references an unknown ID "myid", at None

The following however, works

{anchor="myid"} ---|--- a | b d | d

Please refer to table (#myid, use counter)

Yes, xml2rfc uses 'anchor' instead of 'id', there is no magic translation done between the two to make xml2rfc happy. If you use {#myid} however the correct thing is done, i.e. anchor for xml output, and id for html output.

/Miek

-- Miek Gieben