Comments (9)
That's pretty weird. What browser is that?
from chroma.
Aha! Okay, interesting...this is because of how tabs work in HTML. Yes, agreed, that will need to be fixed...hmm.
from chroma.
Interestingly, Pygments has the exact same issue:
vs.
from chroma.
@alecthomas
Thank you for your quick reply.
I see what's going on, but I'm afraid that I'm not good at HTML & CSS. I hope it'll be fixed.
from chroma.
I think there are two solutions to this:
- Explicitly expand tabs to spaces inside Chroma. This will be non-trivial, as it would have to buffer tokens and reconstruct lines.
- Use tables for the generated HTML.
from chroma.
@alecthomas
I think 1st idea 'tabs to spaces' is the best solution, because low cost to implement I guess.
from chroma.
See #54 (comment)
from chroma.
Thank you @bep
Your PR would solves my issue.
from chroma.
I think that this can be closed given that Pygments also doesn't solve this for the non-table case.
from chroma.
Related Issues (20)
- Add a line protocol syntax lexer
- Language parameter to the playground HOT 2
- `Analyse()` should return the score as well HOT 4
- No theme background color in TTY formatters HOT 2
- Syntax highlight for log extension files HOT 1
- Java text blocks HOT 1
- Get text with hexadecimal digits for colors HOT 1
- lexers.Analyse does not recognise Dockerfile, whereas quick.Highlight does HOT 1
- Add lexer for Typst HOT 2
- Mojolicious Embedded Perl (`.ep`)
- Kotlin destructuring declarations highlighted as syntax error HOT 2
- DNS / BIND9 Zone files are wrongly highlighted (`err` class) HOT 2
- Add support for Rego HOT 1
- Dependency Dashboard
- Surround whitespace (invisible characters) with tags
- Add mIRC formatter support
- Styles with no text color
- Add support for Lean
- `lexer.Match` does not work as intended HOT 5
- LineHighlight style is incorrect HOT 5
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 chroma.