informalsystems / themis-tracer

A tool for managing complex contexts for developing critical systems
Apache License 2.0
4 stars 0 forks source link

Add command to linkify tags and tag reference #61

Closed shonfeder closed 3 years ago

shonfeder commented 3 years ago

(1)

Wherever we find |FOO.1::BAR.1| rewrite it to <a id="FOO.1::BAR.1" class="lu-tag">|FOO.1::BAR.1|</a>. The addition of the lu-tag is important, since it will facilitate front-end computations, such as producing links to all ancestors/children on hover or styling the tags in particular ways.

(2)

In each file where we find [FOO.1::BAR.1], suffix the reference link [FOO.1::BAR.1]: /url/to/source/file.md##FOO.1::BAR.1. This will make the links live.

shonfeder commented 3 years ago

Ultimately, this should be implemented as a transformation of the markdown AST we consume, but this depends on #33. Since we're going to use a workaround to unblock the parsing problems for the sake of meeting Q1 delivery goals, we'll defer that until Q2.

That means we'll need a stop gap here too. This will be in the form of a regex replacement for (1) and a regex to gather matches for (2), and then we'll append the link references to the file.