Subject: [Rfc-markdown] new kramdown-rfc2629 feature in 1.5.13

From: "Martin Thomson" <[email-masked]>
Date: Fri, 29 Oct 2021 12:58:03 +1100

Hey folks,

With Carsten's help I've added a new feature to kramdown-rfc2629 that supports auto-linking of key concepts.

If you have a special term, it is already possible to (ab)use kramdown's "abbreviations" syntax to have that term indexed.  For example:

```
*[IMPORTANT CONCEPT]:
```

This turns all uses of the string "IMPORTANT CONCEPT" in the text to be marked with an <iref> element.  The result is that all instances of the concept are put into your index for easy reference.

The feature that I've added also turns those uses into links like so:

```
*[KEYWORD]: #
```

All instances of KEYWORD then become:

```
<xref target="KEYWORD" format="none">KEYWORD</xref><iref item="KEYWORD"/>
```

If you have an anchor in the document, all instances of "KEYWORD" will now be linked to that anchor.  This uses the format="none" decoration on links so that hyperlinks will be added to HTML, but you won't pollute your document with " (Section 4.7)" throughout.

You can control the target of the link by targeting an anchor as follows:

```
*[KEYWORD]: #sec-keyword
```

Note that the keyword will still be indexed, but you can control that indexing using the existing syntax for abbreviations and indexing.
```
<!-- "CONCEPT A" is indexed as item="idea" subitem="alpha" -->
*[CONCEPT A]: #concept-a (((idea,alpha)))
<!-- "IMPORTANT" is indexed as item="important" subitem="note" -->
*[IMPORTANT]: #sec-important note
```

These "abbreviation" instructions can be added to a new line anywhere in the body of a document, so you can put them next to their definition or at the end as you see fit.