With something like 
[https://python-markdown.github.io/extensions](https://python-markdown.github.io/extensions),
 class/id and other attributes could be defined for text entities. This could 
provide everything from formatting (e.g. admonitions) to functional annotations 
(like test compilation of example code in comments). The latter could also be 
achieved with fenced code blocks from Github Flavored Markup: the standard only 
uses the first word after the ``` for language detection, the rest of the 
string is permitted but unused and could be used for code block annotations.

Reply via email to