cabo / kramdown-rfc

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

PIs indicating line numbers #205

Open CxRes opened 1 year ago

CxRes commented 1 year ago

I am not sure if this is a bug or being done intentionally. I am finding tags like <?line 35?> are being introduced in place of section separators, referring to the section separator line in the markdown. You can see these in the samples for #203.

I don't think they affect the html/txt output, but should they exist in the xml?

cabo commented 1 year ago

Yes, this is a feature.

There is no PHP involved, these are XML processing instructions (PIs). PIs are ignored by RFCXML.
The objective is to at some point be able to translate back from an xml2rfc error message about the XML to a location in the markdown source.

This feature is not complete, but already can be useful when manually mapping back.