Giter Club home page Giter Club logo

Comments (10)

colinodell avatar colinodell commented on August 16, 2024 1

The underlying library does not plan to support this feature, as Markdown is already a "plain-text" format designed to be perfectly readable without conversion to HTML.

I'd recommend either the strip_tags() approach, or if you really want to, create your own custom renderers to modify how the intermediate AST is converted.

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on August 16, 2024

Not sure what you mean?

from laravel-markdown.

BenWoodford avatar BenWoodford commented on August 16, 2024

Turns

This is a _markdown_ example

Into

This is a markdown example

without any formatting applied

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on August 16, 2024

Just put the output through php's strip_tags function.

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on August 16, 2024

That's still a pretty strange thing for you to be doing though? Why go through the expensive parsing and conversion process only to remove it all?

from laravel-markdown.

BenWoodford avatar BenWoodford commented on August 16, 2024

Doesn't work in circumstances where you're just wanting to remove Markdown formatting but not others (BBcode, HTML, etc). :/

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on August 16, 2024

I don't really see why you'd want to do that. Sounds like you need to write your own program from scratch to really do the job properly.

from laravel-markdown.

alariva avatar alariva commented on August 16, 2024

I understand that @BenWoodford is willing to be able to display parsed markdown and cleartext as well, by using the same markdown(ed) source. This could be useful in some circumstances, but stripping resulting html sounds like enough workaround.

from laravel-markdown.

bergstar avatar bergstar commented on August 16, 2024

For instance in Laravel Nova there is Markdown field, but like on index page - it is better to show text as-is without markdown. It would be nice to have this feature and its just a natural / normal thing to have.

from laravel-markdown.

alariva avatar alariva commented on August 16, 2024

Agree on @colinodell, sounds like the approach to go about it in compliance with the existing functionality.

from laravel-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.