Comments (4)
I should say I am on pandoc version 2.17.1.1
(debian testing).
When I leave out the template option above, the html body is the same but the line numbers do show (It is magic to me where the actual numbers come from but that's unrelated :)).
I also tried with --highlight-style=tango
, same thing.
from pandoc-goodies.
I wonder if this is related? It is quite old...
jgm/pandoc#4128
The line numbers seem to be there, but shifted somehow. If I disable the CSS styling (close to the pointer in the image below), they appear.
Sorry for my clumsy attempts at debugging this.
Any help would be appreciated!
from pandoc-goodies.
It should be easy to determine whether it's a CSS related issue or a problem with the highlighter not producing the line numbers — in the former, inspection of HTML contents should reveal the line numbers, which might be hidden due to CSS problems, whereas in the latter the line numbers should not be present in the generated HTML.
I don't remember exactly whether line-numbers are added by Skylighting (the syntax highlighter library) or pandoc itself. But chances are that when using a syntax highlighter with auto-detection of the language, if the highlighter fails to detect a language (and thus to syntax highlight at all), it might be the case that line-numbers are not generated (since the highlighter might be bypassed), so in this respect different highlighters might work differently.
It might be the case that the CSS needs tweaking, although I thought I had covered line-numbering styles — I surely did for Highlight, which is the external highlighter that I use most with pandoc, rather than the built-in Skylighting.
Anyhow, if the problem is CSS related it should be easy to fix. If you have a solution, please create a pull request, otherwise allow me some time to find a free afternoon where I can look into it.
from pandoc-goodies.
Sure, no rush. I am quite sure that it is a CSS thing, because the html body is exactly the same with your or the default template (where it works as expected).
It seems that the numbers themselves fall out of some counter when the CSS is rendered (see my img, two lines above the cursor). They do not appear in the html itself, no matter the template.
from pandoc-goodies.
Related Issues (10)
- $table-of-contents$ instead of $toc$ HOT 2
- Floating Header Link in GitHub HOT 5
- How is the underlying of line numbers controlled? HOT 7
- native gfm task list as lua-filter HOT 7
- how to use it for convert markdown to html? HOT 4
- GitHub.html5 and `<....` HOT 9
- Pandoc version requirement? HOT 1
- Support relative page header links HOT 8
- unexpected "-", expecting letter HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandoc-goodies.