Brett on 01 Mar, 2021 01:56 PM
Hi Lennart, thanks for the suggestion.
This is something I've considered before, and I can see its usefulness,
but it hasn't seemed feasible.
Line numbers in the input don't directly correlate with line numbers in
the output. Whitespace alone causes differences. Because Marked isn't
responsible for the actual Markdown->HTML conversion (it uses either
MultiMarkdown or Discount, depending on settings), the only way to
associate input lines with output lines would be to add markup to the
raw text (invisible span tags with the source line number) that would
then be included in that line's output. This would be ugly to start
with, and would require a lot of special handling because it would break
things like hard line breaks, tables, code blocks, etc..
There are other considerations as well, but that's the primary one
that's kept me from attempting this.