tag:support.markedapp.com,2011-09-11:/discussions/suggestions/46600-source-line-numbersMarked: Discussion 2021-03-01T13:56:47Ztag:support.markedapp.com,2011-09-11:Comment/490623932021-03-01T13:56:46Z2021-03-01T13:56:46ZSource Line Numbers<div><p>Hi Lennart, thanks for the suggestion.</p>
<p>This is something I've considered before, and I can see its usefulness,<br>
but it hasn't seemed feasible.</p>
<p>Long explanation:</p>
<p>Line numbers in the input don't directly correlate with line numbers in<br>
the output. Whitespace alone causes differences. Because Marked isn't<br>
responsible for the actual Markdown->HTML conversion (it uses either<br>
MultiMarkdown or Discount, depending on settings), the only way to<br>
associate input lines with output lines would be to add markup to the<br>
raw text (invisible span tags with the source line number) that would<br>
then be included in that line's output. This would be ugly to start<br>
with, and would require a lot of special handling because it would break<br>
things like hard line breaks, tables, code blocks, etc..</p>
<p>There are other considerations as well, but that's the primary one<br>
that's kept me from attempting this.</p>
<p>Thanks,<br>
Brett</p></div>Brett