cabo / kramdown-rfc

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

Clarify Index behaviour #211

Open CxRes opened 1 year ago

CxRes commented 1 year ago

Surrounding a word in triple brackets, so that it is added to the index is causing the word to vanish?

Input:

This (((!vanishes))).

This also (((vanishes))).

Output

<t>This <iref item="vanishes" primary="true"/>.</t>

<t>This also <iref item="vanishes"/>.</t>

This seems counter-intuitive since one would expect the word that they index to remain.

Also:

*[not]: (((not)))

This does not go away.

will render with the "not"!

cabo commented 1 year ago

It is often necessary to go to a base form for an index entry, so most likely you'd wanted to say

This vanishes (((vanish)))

(This is also the way <iref is processed in RFCXML.)

The search-based syntax is indeed different: It is meant to apply itself to text that remains readable as markdown text.