Giter VIP home page Giter VIP logo

Comments (4)

puzrin avatar puzrin commented on May 18, 2024

https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer

You can override existing renderer, this feature already exists.

from markdown-it.

dwaite avatar dwaite commented on May 18, 2024

Is the proper way to do this to override link_open (and image) in the renderer with a version that resolves the url?

It seems more appropriate to modify the token data at an earlier stage, so that any other custom rules will get resolved URLs.

from markdown-it.

puzrin avatar puzrin commented on May 18, 2024

You can do it in core chain too. https://github.com/markdown-it/markdown-it-for-inline

It's up to you - depends on your needs.

from markdown-it.

dwaite avatar dwaite commented on May 18, 2024

I overrode link_open, but am only modifying the token and passing control on. I'll modify image after I refactor the code.

This should let other overrides work as long as the ordering is correct.
https://github.com/dwaite/wintersmith-markdown-it/blob/master/index.coffee#L28-L55

from markdown-it.

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.