From: Holger R. <Ra...@mr...> - 2009-03-09 09:49:59
|
Yuri asked me to report this bug here. I think it is intentional, but this is clearly a wrong way of doing table support. --- snip --- The bug tracker has been fixed and I logged the bug. Can you report it to the mailing list, though? - yuri On Sun, Mar 8, 2009 at 3:34 AM, Holger Rapp <Hol...@gm...> wrote: > didn't suceed in opening a ticket: > > markdown("""*This is bold* _This too_""", extensions=["tables"]) > > yields > u'<table><em>This is bold</em> <em>This too</em></table>' > > tables extension seems to replace all <p> elements with <table>... > This is > pretty broken. > Regards, Holger |
From: Waylan L. <wa...@gm...> - 2009-03-10 02:49:30
|
On Mon, Mar 9, 2009 at 4:49 AM, Holger Rapp <Ra...@mr...> wrote: [snip] > > tables extension seems to replace all <p> elements with <table>... This is > pretty broken. > Thanks for the report Holger. I just pushed a fix to the repo. Turns out that code was pretty naive. This is the first I've looked at that extension very closely and I'd say the entire extension could use a refactor (rewritten as a blockprocessor), but at least a fix is in for now. -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |
From: Ron G. <ro...@fl...> - 2009-03-10 05:00:01
|
I have not looked at the new code yet, but I have had good luck with the following extension for the old version: http://brian-jaress.livejournal.com/5978.html If the current code is in need of an overhaul you might want to consider using this as the new baseline. rg On Mar 9, 2009, at 7:49 PM, Waylan Limberg wrote: > On Mon, Mar 9, 2009 at 4:49 AM, Holger Rapp <Ra...@mr...> wrote: > [snip] >> >> tables extension seems to replace all <p> elements with <table>... >> This is >> pretty broken. >> > > Thanks for the report Holger. I just pushed a fix to the repo. Turns > out that code was pretty naive. This is the first I've looked at that > extension very closely and I'd say the entire extension could use a > refactor (rewritten as a blockprocessor), but at least a fix is in for > now. > > -- > ---- > \X/ /-\ `/ |_ /-\ |\| > Waylan Limberg > > ------------------------------------------------------------------------------ > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Waylan L. <wa...@gm...> - 2009-03-10 05:14:01
|
On Mon, Mar 9, 2009 at 11:59 PM, Ron Garret <ro...@fl...> wrote: > I have not looked at the new code yet, but I have had good luck with > the following extension for the old version: > > http://brian-jaress.livejournal.com/5978.html > > If the current code is in need of an overhaul you might want to > consider using this as the new baseline. > Thanks for the link. I hadn't seen that. However, the only table extension I'll be doing is one that copies PHP Markdown's syntax for tables. There was just a big long discussion on the markdown list about this and, well, it wasn't convincing. Anyway, that is one of the great things about the extension framework; anyone can write their own. -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |
From: Holger R. <Ra...@mr...> - 2009-03-10 07:54:58
|
Thanks for the quick fix, waylan. I will check it out, most probably this weekend. Can you point me to examples/documentation for implementing a blockprocessor extension? I badly need table support for the wiki of widelands.org and I will most likely hack something anyway, so I can as well do it right and implement it in markdown. Greetings, Holger Am 10.03.2009 um 03:49 schrieb Waylan Limberg: > On Mon, Mar 9, 2009 at 4:49 AM, Holger Rapp <Ra...@mr...> wrote: > [snip] >> >> tables extension seems to replace all <p> elements with <table>... >> This is >> pretty broken. >> > > Thanks for the report Holger. I just pushed a fix to the repo. Turns > out that code was pretty naive. This is the first I've looked at that > extension very closely and I'd say the entire extension could use a > refactor (rewritten as a blockprocessor), but at least a fix is in for > now. > > -- > ---- > \X/ /-\ `/ |_ /-\ |\| > Waylan Limberg |
From: Waylan L. <wa...@gm...> - 2009-03-10 12:49:09
|
Your welcome Holger. See `docs/writing_extensions.txt` in the source for full documentation. You may also want to look at the definition list extension as an example. On Tue, Mar 10, 2009 at 3:54 AM, Holger Rapp <Ra...@mr...> wrote: > Thanks for the quick fix, waylan. I will check it out, most probably > this weekend. > Can you point me to examples/documentation for implementing a > blockprocessor extension? I badly need table support > for the wiki of widelands.org and I will most likely hack something > anyway, so I can as well do it right and implement it in markdown. > > Greetings, > Holger > > > Am 10.03.2009 um 03:49 schrieb Waylan Limberg: > >> On Mon, Mar 9, 2009 at 4:49 AM, Holger Rapp <Ra...@mr...> wrote: >> [snip] >>> >>> tables extension seems to replace all <p> elements with <table>... >>> This is >>> pretty broken. >>> >> >> Thanks for the report Holger. I just pushed a fix to the repo. Turns >> out that code was pretty naive. This is the first I've looked at that >> extension very closely and I'd say the entire extension could use a >> refactor (rewritten as a blockprocessor), but at least a fix is in for >> now. >> >> -- >> ---- >> \X/ /-\ `/ |_ /-\ |\| >> Waylan Limberg > > > ------------------------------------------------------------------------------ > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |
From: Waylan L. <wa...@gm...> - 2009-03-10 21:50:45
|
Btw, before you spend your time working on this, I just whipped one up. I still have a few edge cases to work out, but I think I'll be replacing the existing tables extension once I do. One thing that almost had me stumped is ElementTree's output for empty cells. I'm getting ``<td />`` rather than ``<td></td>``. If I give all empty cells a single space, then I get ``<td> </td>``, but that feels like a dirty hack and doesn't match PHP's output either. If I switch ``output_format='HTML4'``, then I get the desired ``<td></td>``. As it turns out, the XHTML output (``<td />``) is valid XHTML (I just checked), so I guess I'll leave it. On Tue, Mar 10, 2009 at 8:48 AM, Waylan Limberg <wa...@gm...> wrote: > Your welcome Holger. See `docs/writing_extensions.txt` in the source > for full documentation. You may also want to look at the definition > list extension as an example. > > On Tue, Mar 10, 2009 at 3:54 AM, Holger Rapp <Ra...@mr...> wrote: >> Thanks for the quick fix, waylan. I will check it out, most probably >> this weekend. >> Can you point me to examples/documentation for implementing a >> blockprocessor extension? I badly need table support >> for the wiki of widelands.org and I will most likely hack something >> anyway, so I can as well do it right and implement it in markdown. >> >> Greetings, >> Holger >> >> >> Am 10.03.2009 um 03:49 schrieb Waylan Limberg: >> >>> On Mon, Mar 9, 2009 at 4:49 AM, Holger Rapp <Ra...@mr...> wrote: >>> [snip] >>>> >>>> tables extension seems to replace all <p> elements with <table>... >>>> This is >>>> pretty broken. >>>> >>> >>> Thanks for the report Holger. I just pushed a fix to the repo. Turns >>> out that code was pretty naive. This is the first I've looked at that >>> extension very closely and I'd say the entire extension could use a >>> refactor (rewritten as a blockprocessor), but at least a fix is in for >>> now. >>> >>> -- >>> ---- >>> \X/ /-\ `/ |_ /-\ |\| >>> Waylan Limberg >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Python-markdown-discuss mailing list >> Pyt...@li... >> https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss >> > > > > -- > ---- > \X/ /-\ `/ |_ /-\ |\| > Waylan Limberg > -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |
From: Waylan L. <wa...@gm...> - 2009-03-12 00:24:09
|
FYI, I just pushed this to the Git repo. Check it out and report back with any problems. As an aside, I am really loving the improvements we made to the extension API. I didn't spend more than 2 hours total (including researching existing syntax etc) to do everything. And most of one of those hours was wasted fretting over the html4 vs. xhtml output. I think it's possible to do anything with an extension now. On Tue, Mar 10, 2009 at 4:50 PM, Waylan Limberg <wa...@gm...> wrote: > Btw, before you spend your time working on this, I just whipped one > up. I still have a few edge cases to work out, but I think I'll be > replacing the existing tables extension once I do. > > One thing that almost had me stumped is ElementTree's output for empty > cells. I'm getting ``<td />`` rather than ``<td></td>``. If I give all > empty cells a single space, then I get ``<td> </td>``, but that feels > like a dirty hack and doesn't match PHP's output either. If I switch > ``output_format='HTML4'``, then I get the desired ``<td></td>``. As it > turns out, the XHTML output (``<td />``) is valid XHTML (I just > checked), so I guess I'll leave it. > > On Tue, Mar 10, 2009 at 8:48 AM, Waylan Limberg <wa...@gm...> wrote: >> Your welcome Holger. See `docs/writing_extensions.txt` in the source >> for full documentation. You may also want to look at the definition >> list extension as an example. >> >> On Tue, Mar 10, 2009 at 3:54 AM, Holger Rapp <Ra...@mr...> wrote: >>> Thanks for the quick fix, waylan. I will check it out, most probably >>> this weekend. >>> Can you point me to examples/documentation for implementing a >>> blockprocessor extension? I badly need table support >>> for the wiki of widelands.org and I will most likely hack something >>> anyway, so I can as well do it right and implement it in markdown. >>> >>> Greetings, >>> Holger >>> >>> >>> Am 10.03.2009 um 03:49 schrieb Waylan Limberg: >>> >>>> On Mon, Mar 9, 2009 at 4:49 AM, Holger Rapp <Ra...@mr...> wrote: >>>> [snip] >>>>> >>>>> tables extension seems to replace all <p> elements with <table>... >>>>> This is >>>>> pretty broken. >>>>> >>>> >>>> Thanks for the report Holger. I just pushed a fix to the repo. Turns >>>> out that code was pretty naive. This is the first I've looked at that >>>> extension very closely and I'd say the entire extension could use a >>>> refactor (rewritten as a blockprocessor), but at least a fix is in for >>>> now. >>>> >>>> -- >>>> ---- >>>> \X/ /-\ `/ |_ /-\ |\| >>>> Waylan Limberg >>> >>> >>> ------------------------------------------------------------------------------ >>> _______________________________________________ >>> Python-markdown-discuss mailing list >>> Pyt...@li... >>> https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss >>> >> >> >> >> -- >> ---- >> \X/ /-\ `/ |_ /-\ |\| >> Waylan Limberg >> > > > > -- > ---- > \X/ /-\ `/ |_ /-\ |\| > Waylan Limberg > -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |