-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line/column numbers in renderer #441
Comments
oops, should have used search first - partially duplicate of #382 Though this one is more specific - I only need location data and going to build sourcemap manually in my code which uses marked. |
Yes please :) I tried doing something with a counter on a custom renderer which increments for each |
I have a work around for my use case: add line number to a language name in fenced code start and then later replace language name back to original (say, renderer is called with code:coffee-123 - this is coffee block starting at line 123, we can combine sourcemap to include this code at offset 123) |
@sidorares, take a look at https://github.com/jonschlinkert/remarkable . It already has line numbers support for all blocks. We did not implemented columns, because could not find real use cases. Also everything can be monkeypatched. |
+1 |
Added a pull-request with partial resolution: #680 |
@andr2 |
I'm generating javascript code from .md files and would like to build source map along the way. Is there any way to get line/column number at the moment when renderer handler is invoked?
The text was updated successfully, but these errors were encountered: