Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@anthonny
Created August 27, 2014 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonny/112271a470faf612d686 to your computer and use it in GitHub Desktop.
Save anthonny/112271a470faf612d686 to your computer and use it in GitHub Desktop.
Atom - Add line numbers in code block of Asciidoctor-preview

Run Cmd/Ctrl+Shift+P and type : Open your stylesheet

Then add the content of style.less in that file.

.asciidoc-preview .listingblock pre.editor-colors {
counter-reset: lines;
.line {
counter-increment: lines;
}
.line::before {
content: counter(lines); text-align: right;
display: inline-block; width: 2em;
padding-right: 0.5em; margin-right: 0.5em;
border-right: 1px solid #e0e0e0 !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment