Documenter.jl icon indicating copy to clipboard operation
Documenter.jl copied to clipboard

Headings not always rendered

Open milankl opened this issue 2 years ago • 6 comments

I have some situations where a ### Heading is consistenly not rendered (locally and on github pages), although all markdown rules seem to be followed image I consequently get these Warnings but no other hint what's going wrong

┌ Warning: invalid local link: unresolved path in dynamical_core.md
│   link.text =
│    1-element Vector{Any}:
│     "Zonal derivative"
│   link.url = "@ref"
└ @ Documenter.Writers.HTMLWriter ~/.julia/packages/Documenter/HmHje/src/Writers/HTMLWriter.jl:2077

Any idea what's going on?

milankl avatar Jun 17 '22 13:06 milankl

Can you create a minimal example markdown file?

fredrikekre avatar Jun 17 '22 13:06 fredrikekre

Haha, I even get this

image

with

# Title

## Heading 1

### Heading 2

Text

### Heading 3

Also text

What?? 😆

milankl avatar Jun 17 '22 13:06 milankl

Okay now it gets spooky 👻

image

I've deleted the ### Heading 2, written by hand another ### Heading 4 underneath and copied the working ### Heading 3 below that. Is it possible that VS Code somehow encodes them differently without displaying the difference?

milankl avatar Jun 17 '22 13:06 milankl

Yeah, current working around is: I take a ### HeadingX that renders fine, copy it into the place where the non-working heading is and change HeadingX to HeadingY, how weird??

milankl avatar Jun 17 '22 13:06 milankl

My only guess is that it has something to do with line endings then, but never seen this problem before.

fredrikekre avatar Jun 17 '22 14:06 fredrikekre

It also looks like a parsing issue (so a problem in the Markdown stdlib), rather than a Documenter problem. What does Markdown.parse_file output when parsing these files?

mortenpi avatar Jun 18 '22 06:06 mortenpi