canonical / praecepta

Creative Commons Attribution Share Alike 4.0 International
12 stars 18 forks source link

Avoid inlining comments in code blocks #42

Closed yhontyk closed 3 months ago

yhontyk commented 3 months ago

Adds a rule that raises a warning every time it detects a code block (defined by `` in MD andcode-blockin reST) and that contains a line with a codeblock (#and//` as of now as the two popular ways to define a comment in many languages, the list can be expanded).

The rule will raise a false positive if # or \\ that is not a comment occurs in the code block. The only example I can think of is Win path format e.g. C:\\. :thinking: