|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Markdown extension using RDiscountI've patched the default Markdown extension so it uses RDiscount
instead of BlueCloth. The point was to improve the accuracy of Radiant's Markdown conversion; for an added bonus it's also really fast. Although the difference in speed diminishes as the amount of Markdown to convert goes down, so if you just have little bits of Markdown here and there, skip it, if you're publishing lengthy articles or pages heavy with Markdown behind the scenes then you'll probably notice a significant difference. See the links at the end for a demonstration. The only down sides are that it requires the `rdiscount` gem to be installed on the server and a little change to the order extensions are loaded. The github page has all the details. It should be noted that the change to extension load order is probably becoming the standard order eventually -- I think unless some reason not to pops up. If none of that's a problem for you then head over to github for the download and a bit more information. There is also the `markdown` branch in my radiant fork where I am trying to get together something that could possibly, eventually be applied to the core; so if you have the `rdiscount` gem installed you get its Markdown filtering and if not you get the standard BlueCloth rendition. Any preference between the standalone extension and getting the `markdown` branch into the core? [bluecloth]: http://johnmuhl.com/test/markdown-bluecloth [rdiscount]: http://johnmuhl.com/test/markdown-rdiscount [github]: http://github.com/johnmuhl/radiant-markdown-extension [radiant]: http://github.com/johnmuhl/radiant _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
|
|
Re: Markdown extension using RDiscountOn Jun 27, 2008, at 10:26 PM, john muhl wrote:
> I've patched the default Markdown extension so it uses RDiscount > instead of BlueCloth. The point was to improve the accuracy of > Radiant's Markdown conversion; for an added bonus it's also really > fast. Although the difference in speed diminishes as the amount of > Markdown to convert goes down, so if you just have little bits of > Markdown here and there, skip it, if you're publishing lengthy > articles or pages heavy with Markdown behind the scenes then you'll > probably notice a significant difference. See the links at the end > for a demonstration. > > The only down sides are that it requires the `rdiscount` gem to be > installed on the server and a little change to the order extensions > are loaded. The github page has all the details. It should be noted > that the change to extension load order is probably becoming the > standard order eventually -- I think unless some reason not to pops > up. > > If none of that's a problem for you then head over to github for the > download and a bit more information. > > There is also the `markdown` branch in my radiant fork where I am > trying to get together something that could possibly, eventually be > applied to the core; so if you have the `rdiscount` gem installed > you get its Markdown filtering and if not you get the standard > BlueCloth rendition. > > Any preference between the standalone extension and getting the > `markdown` branch into the core? > > > [bluecloth]: http://johnmuhl.com/test/markdown-bluecloth > [rdiscount]: http://johnmuhl.com/test/markdown-rdiscount > [github]: http://github.com/johnmuhl/radiant-markdown-extension > [radiant]: http://github.com/johnmuhl/radiant Looks nice. I've been frustrated by strange parsing bugs, but never looked into it. A more accurate implementation of the syntax gets a warm welcome from me. -Jim _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
|
|
Re: Markdown extension using RDiscountOn 2008/06/27, at 21:02, Jim Gay wrote:
> On Jun 27, 2008, at 10:26 PM, john muhl wrote: > >> I've patched the default Markdown extension.... > > Looks nice. I've been frustrated by strange parsing bugs, but never > looked into it. A more accurate implementation of the syntax gets a > warm welcome from me. If you happen to have samples handy of the Markdown that caused trouble I'd be happy to add them to the test page. _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
|
|
Re: Markdown extension using RDiscountOn Jun 28, 2008, at 2:35 PM, john muhl wrote: > On 2008/06/27, at 21:02, Jim Gay wrote: > >> On Jun 27, 2008, at 10:26 PM, john muhl wrote: >> >>> I've patched the default Markdown extension.... >> >> Looks nice. I've been frustrated by strange parsing bugs, but never >> looked into it. A more accurate implementation of the syntax gets a >> warm welcome from me. > > If you happen to have samples handy of the Markdown that caused > trouble I'd be happy to add them to the test page. I haven't looked at your branch yet, but one particular problem I'm having is that **bold** should be formatted as <strong>bold</strong> but BlueCloth parses it as *<strong>bold</strong>* The Filter documentation in Radiant suggests using **bold** (which is the correct syntax) but I avoid encouraging the use of Markdown for that single reason... in the client's eyes the documentation is wrong, but in actuality the implementation is wrong. -Jim _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
|
|
Re: Markdown extension using RDiscountOn 2008/06/29, at 21:23, Jim Gay wrote:
> On Jun 28, 2008, at 2:35 PM, john muhl wrote: > >> On 2008/06/27, at 21:02, Jim Gay wrote: >> >>> On Jun 27, 2008, at 10:26 PM, john muhl wrote: >>> >>>> I've patched the default Markdown extension.... >>> >>> Looks nice. I've been frustrated by strange parsing bugs, but >>> never looked into it. A more accurate implementation of the syntax >>> gets a warm welcome from me. >> >> If you happen to have samples handy of the Markdown that caused >> trouble I'd be happy to add them to the test page. > > ...one particular problem I'm having is that **bold** should be > formatted as <strong>bold</strong> but BlueCloth parses it as > *<strong>bold</strong>*... It was actually **12** being parsed as <em>*12*</em> that drove me to plugging in RDiscount. Now I've started documenting the deficiencies in the RDiscount version on the github wiki. I think they're insignificant so far, since there is nothing that will ever get you called by a client irritated about their CMS; unless your clients do crazy nested <div>s in their Markdown :) For what it's worth the Safari Web Inspector reports 10 HTML errors on the BlueCloth version of the test page, while it reports 1 on the RDiscount version (in the Advanced Inline HTML test which Markdown.pl itself would fail). http://github.com/johnmuhl/radiant-markdown-extension/wikis/inconsistencies _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
| Free Forum Powered by Nabble | Forum Help |