cabo / kramdown-rfc

An XML2RFC (RFC799x) backend for Thomas Leitner's kramdown markdown parser
MIT License
189 stars 79 forks source link

xref in figure #38

Open martinthomson opened 7 years ago

martinthomson commented 7 years ago

Including a {{?RFCXXXX}} reference in a figure leads to some strange results. The final document has the reference added to the right section, but the figure isn't updated to [RFCXXXX], instead it shows {{RFCXXXX}} (the "?" is removed).

Now I don't believe that references in figures need to be respected. Doing so would make it hard to include literal, unmodified text. However, this particular outcome is a little unexpected.

See the RFC5827 reference in https://raw.githubusercontent.com/quicwg/base-drafts/3dbbbf1227b359681850fddd631f389379655d73/draft-ietf-quic-recovery.md

cabo commented 7 years ago

The slightly surprising behavior is an artifact of the way the YAML header autogeneration happens (by substitution before markdown parsing). Not sure that this needs to be fixed, as references in figures will continue to not work.

martinthomson commented 7 years ago

My only suggestion would be to warn or generate an error if this happens.