[kramdown-users] kramdown table-making has gone completely insane

Matt Neuburg matt at tidbits.com
Mon Oct 11 01:18:49 EDT 2010


Presumably, that is what used to happen, since I've had that line in my page for months and many versions of kramdown. This behavior is evidently new with this version of kramdown. (I'm sorry I can't be more specific to say what I mean by "this version", but the previous two versions that I was using were both called 0.11.0 and so is this one, even though they are all three quite different from each other.) 

The docs do say, in fact, "Note that literal pipe characters need to be escaped, even if they occur in code spans!" Now, maybe that was never there before - if it was there, I never noticed it. But in fact I could not find any way of escaping these pipe characters so as to solve the problem. I mean, look, there are only three possibilities: escape the first, escape the second, and escape both. But none of those prevents the problem. m.


On Oct 10, 2010, at 9:03 AM, Shawn Van Ittersum wrote:

> More generally, I think that kramdown should ignore the contents of any code block or span.  I can't think of a good reason for kramdown to interpret the contents of code blocks.  If it didn't, then this table creation problem would go away.
> 
> Shawn
> 
> On Sun, 10 Oct 2010 08:34:04 -0700, Matt Neuburg wrote:
>> require 'kramdown'
>> s = <<END
>> The operator `||` is called logical-or.
>> END
>> puts Kramdown::Document.new(s).to_html
>> 
>> 
>> What I expect:
>> 
>> <p>The operator....
>> 
>> What I get:
>> 
>> <table>
>>  <tbody>
>>    <tr>
>>      <td>The operator `</td>
>>      <td>&nbsp;</td>
>>      <td>` is called logical-or.</td>
>>    </tr>
>>  </tbody>
>> </table>
>> 
>> There are actually two errors here. One is that &nbsp; must never be
>> emitted, since I am using kramdown in an XSLT-processing context and
>> &nbsp; is not a legal XML entity. Asking for :numeric output of entities
>> makes no difference.
>> 
>> 
>> However, the obvious larger error is that the table-parser has suddenly
>> taken over and thinks this is a table. This is a new error (i.e. since the
>> last release I was using). m.
>> 
>> Workarounds: none found! I can't think what to do aside from trying to
>> revert to an earlier version of kramdown. m.
>> 
>> -- 
>> matt neuburg, phd = matt at tidbits.com, http://www.tidbits.com/matt/
>> pantes anthropoi tou eidenai oregontai phusei
>> Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
>> AppleScript: the Definitive Guide, 2nd edition
>> http://www.tidbits.com/matt/default.html#applescriptthings
>> Take Control of Exploring & Customizing Snow Leopard
>> http://tinyurl.com/kufyy8
>> RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
>> TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
>> 
>> 
>> 
>> 
>> _______________________________________________
>> kramdown-users mailing list
>> kramdown-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/kramdown-users
> _______________________________________________
> kramdown-users mailing list
> kramdown-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/kramdown-users



More information about the kramdown-users mailing list