GithubHelp home page GithubHelp logo

Comments (3)

facelessuser avatar facelessuser commented on June 20, 2024

If you'd like, you can use SuperFences to preserve tabs. This accounts for code blocks earlier, before Python Markdown normalizes tabs to spaces. Then you can style them however you want.

from markdown.

waylan avatar waylan commented on June 20, 2024

I'm not sure how we would accomplish this as the first thing the parser does is strip all tabs from a document and replace those tabs with spaces. This is done before any parsing happens so code blocks have not been identified yet and there would be no way to differentiate and avoid code blocks at that stage. While we could change/remove that behavior, it would require the entire parser to now account for tabs in additional to spaces for indentation, etc. which would be a massive amount of work. It would also be a backward incompatible change in that it would require many third-party extensions to make changes as well. Therefore, it seems to me like the alternative solutions you already listed (third-party extension or manual formatting) would be a better solution. After all, as far as I can tell, this is a need of only a very small minority of our users.

Something that could potentially cause me to reconsider is if you could point to other implementations which already support this. Also, if a third-party extension was created and it became wildly popular, then we might be more inclined to adopt that behavior. However, as it stands now, it appears that this would be a new behavior only implemented by one implementation, which makes it ideal for a third-party extension.

from markdown.

waylan avatar waylan commented on June 20, 2024

If you'd like, you can use SuperFences to preserve tabs. This accounts for code blocks earlier, before Python Markdown normalizes tabs to spaces. Then you can style them however you want.

Apparently, a third-party extension already exists which implements this. I am closing this.

from markdown.

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.