Giter Site home page Giter Site logo

[Request] Control tab width about highlight.js HOT 3 CLOSED

 avatar commented on June 25, 2024
[Request] Control tab width

from highlight.js.

Comments (3)

joshgoebel avatar joshgoebel commented on June 25, 2024

I try to use the CSS tab-size on the pre element, not working.

It most certainly works if your content includes actual ASCII tab characters (byte value: 9). Mozilla includes an example of this working in the docs: https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size. If this doesn't work in your browser then there is a problem with your browser and we can't help with that. If it does work in your browser but just not with Highlight.js you could provide a JSfiddle that reproduces the problem and we can take a closer look.

If tab-size does nothing it's likely you're using spaces (not tabs), and there are no built-in features to control tab width when the tabs are composed of individual spaces.

Or sometimes the whitespace is not even exist and I don't know how it indent.

If the whitespace is simply missing in the source code I'm not sure how we could help...

from highlight.js.

joshgoebel avatar joshgoebel commented on June 25, 2024

We used to have an option for replacing tabs with a number spaces: #2874 (though again it sounds like you aren't using real tabs at all)

It was removed, in favor of using the newer CSS features.

from highlight.js.

joshgoebel avatar joshgoebel commented on June 25, 2024

Closing as #wontfix.

from highlight.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.