Hi!
Could it be possible to show the line number in the code blocks as below?
1 // Declare myVariable
2 var myVariable string
3
4 // Another comment
5 myVariable = ...
Is a very useful feature when you are describing the code and want to reference a specific line.
Hi @dtgoitia ,
How would you like it to be supported? So you want all code blocks to have line numbers? Or only some specific code block to have line number?
Thanks
Hi @shd101wyy ,
I think the best way is that only some specific code blocks have line numbers, so that old markdown files can keep their style consistent if they will.
I don't how would be easier to achieve this. Maybe to create a new type of code block? Or maybe an optional flag in some point of the code block could enable the line numbers?

Many thanks for your interest!
My plan is to support class:"lineNo" so that the lineno will be added to the class list of code block.
And lineno class will show line numbers.
For example:

I have finished implementing this feature here.
However, I will not release the new version so soon because I am also working on some other new features. Feel free to give me suggestions.
Thanks :)
That's exactly what I was looking for. Great job @shd101wyy !
@dtgoitia Done!
Cheers :)
Done, check this doc.
Cheers :)
@shd101wyy it works great using {.lineNo}, and it does work stating only lineNo too, but the second options shows the numbers left aligned without any margin. Not an issue, though :)
Hi @dtgoitia , this is now changed again. Check this doc.
Thanks for the update @shd101wyy ! :D
Hi @shd101wyy , in Atom, the line-numbers feature will affect the code color of the block. Is there any solution? e. g.

Best,
Tao
@GHjiangtao2014 try installing language-gfm-enhanced.
Most helpful comment
My plan is to support
class:"lineNo"so that thelinenowill be added to the class list of code block.And
linenoclass will show line numbers.For example:
I have finished implementing this feature here.
However, I will not release the new version so soon because I am also working on some other new features. Feel free to give me suggestions.
Thanks :)