[{"data":1,"prerenderedAt":314},["ShallowReactive",2],{"project-7783501":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":42,"post_text":44,"what":45,"said":78,"maker_in_thread":185,"shape":187,"grid":192,"attempts":275,"same_week":276,"maker_shows":43,"maker_hidden":306,"reader_version":307,"card":308},"7783501","Parsedown","Fast and Extensible Parser for Markdown in PHP","title","Show HN: Fast and Extensible Parser for Markdown in PHP","http:\u002F\u002Fparsedown.org\u002F","parsedown.org","erusev",1400762536,2014,88,37,327,2272,15,"notable","languages","markdown parser library","library",[24,25,26,27],"markdown","php","markdown parser","fast parser","debated",-0.034,{"positive":31,"neutral":31,"mixed":32,"critical":33},5,0,6,16,{"privacy":36,"execution":38,"performance":39,"design":41},{"positive":32,"critical":37},1,{"positive":32,"critical":37},{"positive":31,"critical":40},2,{"positive":32,"critical":40},[32,32,32,32,32,32,32,37,32,32,32,32,43,37,43,43,31,32,31,32,31,32,43,43,31,32,31,37,32,37,37,32,32,32,37,32,32],3,null,{"problem":46,"audience":62,"pricing":44,"motivation":44,"time_to_build":44,"stack":70,"openness":77,"stage":77,"team_size":77},{"value":47,"source":48,"evidence":49},"Converting Markdown to HTML quickly in PHP.","inferred",[50,54,58],{"id":51,"by":52,"text":53},"7784083","zaf","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.",{"id":55,"by":56,"text":57},"7783701","seer","As with most tech, if there such a leap in speed (about 10 times) then a lot of other applications become possible. You could remove a layer of caching because its not needed…",{"id":59,"by":60,"text":61},"7783714","oneeyedpigeon","If you're building a static site from markdown files, and your site consists of thousands of pages, speed will definitely be a concern.",{"value":63,"source":48,"evidence":64},"PHP developers, including CMS and static site builders.",[65,69],{"id":66,"by":67,"text":68},"7783614","alphadevx","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…",{"id":59,"by":60,"text":61},[71],{"value":72,"source":73,"evidence":74},"PHP","maker",[75],{"id":76},"post","unknown",{"praise":79,"objections":90,"requests":135,"questions":140,"alternatives":149},[80,86],{"value":81,"source":82,"evidence":83},"Very fast; speed is its main selling point.","commenter",[84,85],{"id":51,"by":52,"text":53},{"id":66,"by":67,"text":68},{"value":87,"source":82,"evidence":88},"Good choice for performance-sensitive Markdown rendering.",[89],{"id":51,"by":52,"text":53},[91,102,113,124],{"value":92,"source":82,"evidence":93},"Not truly extensible; extending requires subclassing the main class.",[94,98],{"id":95,"by":96,"text":97},"7783610","phpnode","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…",{"id":99,"by":100,"text":101},"7784404","lacksconfidence","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…",{"value":103,"source":82,"evidence":104},"Uses regex, which some consider the wrong approach for parsing.",[105,109],{"id":106,"by":107,"text":108},"7783607","Navarr","I remember seeing this on \u002Fr\u002FPHP, 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…",{"id":110,"by":111,"text":112},"7784953","tshadwell","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…",{"value":114,"source":82,"evidence":115},"Output needs sanitizing to avoid XSS from raw HTML.",[116,120],{"id":117,"by":118,"text":119},"7784044","simonw","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…",{"id":121,"by":122,"text":123},"7784437","McGlockenshire","Easily solved by proper use of HTMLPurifier on the output.",{"value":125,"source":82,"evidence":126},"Possible edge-case parsing differences with list and HTML blocks.",[127,131],{"id":128,"by":129,"text":130},"7784332","brute","Different markdown editors seem to be in disagreement how to parse the following: https:\u002F\u002Fgist.github.com\u002Fanonymous\u002F810ae1f7d52bcfffa1ef If the second empty line marks the end of…",{"id":132,"by":133,"text":134},"7784412","stevekemp","Yeah it looks like my site fails at this - http:\u002F\u002Fmarkdownshare.com\u002Fview\u002F96996ce5-63bc-45ca-af49-ba18cb53ace1",[136],{"value":137,"source":82,"evidence":138},"Support for multiple independent extensions.",[139],{"id":99,"by":100,"text":101},[141],{"value":142,"source":82,"evidence":143},"Is it faster than C-based PHP extensions like Sundown?",[144,148],{"id":145,"by":146,"text":147},"7784219","debaserab2","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.…",{"id":110,"by":111,"text":112},[150,156,160,164,171,178],{"value":151,"source":82,"evidence":152},"Parsedown Extra",[153],{"id":154,"by":56,"text":155},"7783790","> 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…",{"value":157,"source":82,"evidence":158},"cebe\u002Fmarkdown",[159],{"id":95,"by":96,"text":97},{"value":161,"source":82,"evidence":162},"Sundown (php-sundown)",[163],{"id":145,"by":146,"text":147},{"value":165,"source":82,"evidence":166},"Mistune",[167],{"id":168,"by":169,"text":170},"7783890","chrismonsanto","> 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…",{"value":172,"source":82,"evidence":173},"marked",[174],{"id":175,"by":176,"text":177},"7785397","nodesocket","We started with a server side Markdown parser, but switch to a JavaScript parser (https:\u002F\u002Fgithub.com\u002Fchjj\u002Fmarked). Really there is no reason to do this work on the server.",{"value":179,"source":82,"evidence":180},"Strictdown",[181],{"id":182,"by":183,"text":184},"7786260","NaNaN","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…",{"comments":32,"answered":32,"key":186},[],{"commenters":188,"max_depth":189,"maker_replies":32,"first_comment_mins":190,"lifespan_hours":191},24,7,28,186,[193,197,200,203,206,207,210,213,215,217,220,223,225,227,229,230,234,236,238,239,242,243,246,249,251,252,254,255,257,259,260,263,265,267,269,271,273],[194,32,32,195,196,32],"7784765","other\u002Fneutral\u002Fidea","ethomson",[198,32,32,195,199,32],"7784884","k__",[201,32,32,202,96,32],"7785462","other\u002Fneutral\u002Fnone",[204,32,32,202,205,32],"7784921","untog",[182,32,32,202,183,32],[208,32,32,202,209,32],"7786932","rhythmvs",[211,32,32,212,183,32],"7787509","commenter\u002Fneutral\u002Fnone",[117,37,37,214,118,32],"project\u002Fcritical\u002Fprivacy",[121,37,32,216,122,32],"commenter\u002Fneutral\u002Fprivacy",[218,37,32,219,96,32],"7784854","commenter\u002Fcritical\u002Fperformance",[221,37,32,222,107,32],"7784924","commenter\u002Fneutral\u002Fperformance",[224,37,32,216,96,32],"7784979",[128,40,43,226,129,32],"project\u002Fneutral\u002Fexecution",[132,40,37,228,133,32],"project\u002Fcritical\u002Fexecution",[106,43,43,226,107,32],[231,43,43,232,233,32],"7783648","project\u002Fneutral\u002Fperformance","nkozyra",[55,43,31,235,56,32],"project\u002Fpositive\u002Fperformance",[237,43,32,222,233,32],"7783723",[59,43,31,235,60,32],[240,43,32,222,241,32],"7784708","aaronem",[168,43,31,235,169,32],[244,43,32,212,245,32],"7783891","coolj",[247,43,43,226,248,32],"7784388","greghendershott",[175,250,43,232,176,32],4,[51,31,31,235,52,32],[145,31,32,253,146,32],"other\u002Fneutral\u002Fperformance",[66,33,31,235,67,32],[95,189,37,256,96,32],"project\u002Fcritical\u002Fdesign",[154,189,32,258,56,32],"commenter\u002Fneutral\u002Fdesign",[99,189,37,256,100,32],[110,261,37,262,111,32],8,"project\u002Fcritical\u002Fperformance",[264,261,32,222,183,32],"7786368",[266,261,32,212,111,32],"7806085",[268,261,32,212,183,32],"7810743",[270,261,37,262,111,32],"7810866",[272,261,32,202,183,32],"7813760",[274,261,32,202,111,32],"7820580",[],[277,282,287,292,296,301],{"id":278,"name":279,"points":280,"category":281},"7805594","fa2png",128,"dev_tools",{"id":283,"name":284,"points":285,"category":286},"7782425","jscapture",87,"creative",{"id":288,"name":289,"points":290,"category":291},"7792072","myEcho",82,"productivity",{"id":293,"name":294,"points":295,"category":291},"7811334","DeveloperAgents",68,{"id":297,"name":298,"points":299,"category":300},"7797953","Duck Face Booth",61,"consumer_social",{"id":302,"name":303,"points":304,"category":305},"7785901","Boxes",52,"games",false,"v2",{"id":309,"name":5,"line":6,"ai":306,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":310,"top":18,"kw":311,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":312,"url":9,"mix":313,"praise":81,"objection":92,"sub":21},7783501,-0.03,[24,25,26,27],"0000000100003133505050335051011000100",[31,31,32,33],1793990905862]