From: Jeff D. <da...@da...> - 2001-11-15 15:59:45
|
On Thu, 15 Nov 2001 12:01:30 +0000 (GMT) "Gary Benson" <ga...@in...> wrote: > I've come to the conclusion that the fact that wiki marks up line by line > means that: > - block-level markup is hard to code > - the WikiSyntax for block-level markup is contrived and ugly. > > I'm working on a prototype two-pass markup scheme that will apply > block-level markup (h[1-6], p, hr, ul, ol, dl, blockquote, pre and maybe > table), leaving lines of text which will have line level markup (i, b, a, > etc), It will hopefully eliminate all the problems in > MeatBall:SillyTextFormattingRules and, incidentally, produce well-formed > XML/XHTML. It will also mean that stuff like ''italics'' will be able to > span multiple lines. > > When I turn it into code it will be a thing of beauty, I promise, but it > is all in my head at the moment. I hope to get it done by sometime this > weekend and then let you all have a look at it. Most excellent. As I've been saying, I've been thinking along similar lines for awhile now. One more point to think about: it would be nice to be able to mark spans of (pre-transformed) wiki-text, then have those spans suitably marked up in the post-transformed (X)HTML. A couple uses for this would be: 1. Fancy diff output. Before transforming, the diff engine produces page text which includes all the deleted text (from the previous revision) as well as the current page text. Added and deleted spans of text would be so marked, somehow. Then after transforming the added and deleted spans of text would be marked up as <span>s (or maybe <strike>, <font color="...">). 2. Jump to match. The full text search output now highlights matching words in the page text. It would be nice if when you click on one of those, you're taken to the location of matching text within the target page. I'm envisioning that if one browsed to a URL something like: http://a.b.c/wiki/HomePage?match=Wiki#match3 in the transformed text, all occurences of the word 'Wiki' would be highlighted --- they would also all be marked up as named anchors: the first match named #match1, ... The best implementation of this would be, I think, (though I haven't though about this too hard) to mark the matching words in a separate step before transforming. Again the transform code has to support some means of marking spans of pre-transformed text. A complication to consider is that the pre-marked spans of text may overlap with other markup in the transformed text. (I.e. in the diff case, an added section of text may span several paragraphs.) I think this means the transform code has to be able to split the pre-marked spans into sub-spans, as necessary, to maintain proper nesting of elements in the final XHTML. No, it's not simple. I'll keep thinking about it, too. |