Closed x3ro closed 12 years ago
All you need to do is insert a blank line before the heading, e.g.:
<!-- \newpage -->
# Some headline
Some very important text.
# Another headline
Some reference to [Some headline][]
Yeah, thanks. However I do think that this should be fixed, because it took me hours to find out what was causing this, and it is clearly unexpected behavior, right?
When I get time, I'll try to add a workaround for this. But in general it's good practice to include a blank line before block level elements to minimize divergent behavior between various Markdown variants.
Actually, may have found easy fix and pushed to development branch. Will need some more testing, but might work.
Thanks. I can see how one should add a blank line, and I wouldn't care if MMD had given me a notices of some kind that my reference had been dropped (because of the missing newline), but it was really confusing for me because I couldn't figure out why it did not create the reference.
If there is any kind of (HTML-style) comment on the line before a headline, then auto-referencing will not work for that headline, for example:
This works
And will result in: \newpage
This does NOT work
And will therefore result in:
Note the last line, where the reference should be. This is always reproducible and will happen even with an empty comment, that is
<!-- -->
.