Brett on 31 Jul, 2021 07:58 PM
Once Markdown is rendered to HTML, the line numbers from the original
document have no direct correlation with the represented version
anymore. So, short answer, there's not currently a way to jump to a
point that represents a given line number from the original document.
I've considered injecting a bunch of hidden HTML tags representing line
numbers before the Markdown conversion happens, which I could then use
to correlate screen position and line number, but all that extra markup
is too messy. Plus it would likely interfere with custom processors,
meaning I could only make it work for people using the built-in
processors, which is then more support tickets. I've definitely thought
about it, though, it would be a useful trick. I just haven't found a
reasonable way to make it work.
I wasn't thinking that Marked 2 was rendering Markdown to HTML. :(
Guess I got too comfortable with the Vim shortcuts on Marked to like 'gg' "G", "/' for find, then I started pressing 22gg and it didn't work. :)