Parsedown

Languages and libraries

markdown parser library

SHOW HN2014

Parsedown

Fast and Extensible Parser for Markdown in PHP

parsedown.org

#markdown#php#markdown parser#fast parser

88points
37comments
#327of 2,272 in 2014
Top 15%of 2014 by points

How HN took it

DebatedReal support and real criticism

5 positive, 5 neutral or asking, 0 mixed, 6 critical, out of 16 comments about the project. Thread score -0.03.

Performance: 5 for, 2 againstDesign: 0 for, 2 againstPrivacy: 0 for, 1 againstExecution: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Very fast; speed is its main selling point.

    From 2 comments
    • I've worked with several markdown implementations and parsedown is my current choice due to my main constraint - speed. Great work and thanks for sharing.
      zaf on HN
    • Looks great, happy to see the Markdown Extra extension. With regard to performance, I've always gotten around the slowness of the original Markdown parser by making liberal use…
      alphadevx on HN
  • Good choice for performance-sensitive Markdown rendering.

    From 1 comment
    • I've worked with several markdown implementations and parsedown is my current choice due to my main constraint - speed. Great work and thanks for sharing.
      zaf on HN

Objections

  • Not truly extensible; extending requires subclassing the main class.

    From 2 comments
    • Parsedown is certainly very fast, but I wouldn't call it "extensible". CeBe's markdown parser is nearly as fast, but focusses on being very easy to extend, so it's trivial to add…
      phpnode on HN
    • It is possible to extend, but extensible requires more. In this case, ParsedownExtra looks to directly extend the Parsedown class. This is fine for a single extension, but it…
      lacksconfidence on HN
  • Uses regex, which some consider the wrong approach for parsing.

    From 2 comments
    • I remember seeing this on /r/PHP, and one of the top comments there was about it using Regex instead of parsing it like a language. However, I also recall that it's thanks to…
      Navarr on HN
    • Perhaps I am looking at this wrong, but I don't see why you would use a Markdown parser written in PHP if you're looking for speed. Case in point the parsedown system is fast…
      tshadwell on HN
  • Output needs sanitizing to avoid XSS from raw HTML.

    From 2 comments
    • It's important to remember that most markdown implementations (including his one) cannot be used to provide a safe mechanism for authoring user generated content without opening…
      simonw on HN
    • Easily solved by proper use of HTMLPurifier on the output.
      McGlockenshire on HN
  • Possible edge-case parsing differences with list and HTML blocks.

    From 2 comments
    • Different markdown editors seem to be in disagreement how to parse the following: https://gist.github.com/anonymous/810ae1f7d52bcfffa1ef If the second empty line marks the end of…
      brute on HN
    • Yeah it looks like my site fails at this - http://markdownshare.com/view/96996ce5-63bc-45ca-af49-ba18cb53ace1
      stevekemp on HN

Requests

  • Support for multiple independent extensions.

    From 1 comment
    • It is possible to extend, but extensible requires more. In this case, ParsedownExtra looks to directly extend the Parsedown class. This is fine for a single extension, but it…
      lacksconfidence on HN

Questions

  • Is it faster than C-based PHP extensions like Sundown?

    From 2 comments
    • If speed is your top priority you may also want to look at Sundown, which can be installed as a PHP extension and is likely faster since it's just C.…
      debaserab2 on HN
    • Perhaps I am looking at this wrong, but I don't see why you would use a Markdown parser written in PHP if you're looking for speed. Case in point the parsedown system is fast…
      tshadwell on HN

Alternatives named

  • Parsedown Extra

    From 1 comment
    • > Parsedown is certainly very fast, but I wouldn't call it "extensible". Parsedown is extensible and it already has been extended. There's a well working extension of Parsedown…
      seer on HN
  • cebe/markdown

    From 1 comment
    • Parsedown is certainly very fast, but I wouldn't call it "extensible". CeBe's markdown parser is nearly as fast, but focusses on being very easy to extend, so it's trivial to add…
      phpnode on HN
  • Sundown (php-sundown)

    From 1 comment
    • If speed is your top priority you may also want to look at Sundown, which can be installed as a PHP extension and is likely faster since it's just C.…
      debaserab2 on HN
  • Mistune

    From 1 comment
    • > That said, has there ever really been an issue with speed as it pertains to markdown translation? Yes, speed of translation is a big deal. I tried at least 4 Markdown parsers…
      chrismonsanto on HN
  • marked

    From 1 comment
    • We started with a server side Markdown parser, but switch to a JavaScript parser (https://github.com/chjj/marked). Really there is no reason to do this work on the server.
      nodesocket on HN
  • Strictdown

    From 1 comment
    • Agreed. Most new Markdown parsers for higher speed have different edge cases, including the famous marked. If you don't mind the frustrating syntax tree, you can try Strictdown…
      NaNaN on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/7783501)