Question: why do you want to post-process the HTML rather than fix the wikifier so that it generates paragraphs rather than <br> tags?
On 24 June 2011 14:15, <[email protected]> wrote: > > As anybody who has inspected the HTML generated with tiddler.text is > rendered to HTML, TiddlyWiki doesn't create perfect HTML. The biggest > standout problems is that instead of making paragraphs, it separates > blocks of text with <br> tags, sometimes 1, sometimes 2, depending on > the number linefeeds present in the original source. > > My question: Has anyone come up with a good way to post-process this > HTML so that it can be used as a reasonable DOM (such that paragraphs > are paragraphs etc). > > With the help of FND I've come up with the first block (up to > "el.children().appendTo(wholething);" here: > > http://cdent.tiddlyspace.com/purpleater > > This works to some extent but is not perfect. Compare: > > http://cdent.tiddlyspace.com/remotebag > http://tiddlyspace.com/bags/cdent_public/tiddlers/remotebag > > The former runs the code and a paragraph after the second list containing > "ControlView" becomes just ControlView. This appears to be because the > code is splitting on two <br> and there is only <br> between the list > and following text. > > This suggests that a bit more brains are needed than the simple split. > > Before I dive too deeply into figuring this out I thought I ought to > ask the community to see if anyone has worked on something similar. > > Thanks. > > To state the need a bit more concisely: I want to process the HTML > generated by tiddlywiki to turn blocks of text that look like > paragraphs into real <p> blocks and get rid of the <br>. For the sake > of this exercise there is no access to the original tiddly text, just > the HTML. > > -- > Chris Dent http://burningchrome.com/ > [...] > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWikiDev" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/tiddlywikidev?hl=en. > > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
