nix-community / nixdoc

Tool to generate documentation for Nix library functions [maintainer=@infinisil]
GNU General Public License v3.0
123 stars 15 forks source link

Bug: Code comments are shifted as they where headings #113

Closed hsjobeki closed 4 months ago

hsjobeki commented 5 months ago

Currently the headings shifting is done by line. Not with an actual markdown parser.

# Heading

```nix
# Comment

Will result in
````md
### Heading

```nix
### Comment


Notice that the code comment got shifted as well. To fix this we could use a markdown parser, or use a simple regex to check if we are within a code block.