[kramdown-users] kramdown + smarty pants punctuation

john muhl johnmuhl at gmail.com
Fri Feb 5 13:19:04 EST 2010


On Fri, Feb 5, 2010 at 11:43 AM, Thomas Leitner <t_leitner at gmx.at> wrote:
> On Fri, 5 Feb 2010 09:11:02 +0100, Thomas Leitner wrote:
>> On Thu, 4 Feb 2010 20:44:24 -0600, john muhl wrote:
>> > does kramdown have an option to turn on smarty pants style
>> > punctuation?
>> >
>> > currently i'm wrapping kramdown with rubypants but there is an issue
>> > with " when i do this; i.e. by the time the kramdown output is
>> > handed off to rubypants all the "s are already &quot;. to get
>> > around that i'm overriding the ESCAPE_MAP to not include " but i
>> > really don't like that; and it causes problems with markdown like
>> > `Foo [bar](/url/ "Title with "quotes" inside")` (the inner quotes
>> > are never converted to entities).
>> >
>> > any suggestions for a better way to handle this or an option i've
>> > overlooked?
>>
>> No, nothing overlooked and no option currently. If you like I can add
>> an opton for the HTML converter to convert plain text elements without
>> using the " to &quot; conversion.
>
> Since there seems no problem in using " instead of &quot; in normal
> HTML text (as opposed to using it in HTML tag attribute values), I have
> changed the HTML converter to not convert " to &quot; in normal text.
> The change will be available with the next release and will hopefully
> help you with integrating kramdown and rubypants.

thanks.


More information about the kramdown-users mailing list