From: "Platonides" platonides@gmail.com
Steve Bennett wrote:
Would it be reasonable to restrict the use of <pre> to:
- General paragraph texts, but not internal or external link captions
- Image captions
Perhaps anywhere else it could be either treated as equivalent to <nowikI>, ignored, or rendered literally?
IMHO we should differentiate between inline tags and block tags. As we're translating wikitext into xhtml, using its same type of restriction makes sense.
So an image caption would onmly be allowed to contain inline tags. <pre> is a block tag.
We could: a) Render <pre> literally [blinking] in red so the user perceives there's a syntax error. b) Refuse to save (bad). c) Use a <span with pre-like format (is it really useful? It means a different ) d) Move the <pre> to the next position where it makes sense.
Or of course: e) Render it literally without making it look ridiculous.
Here's my thoughts on the above options: a) No - use (e) instead. b) Never refuse to save c) This is a possibility. However we would need to make this behaviour consistent across the whole parser, e.g. <pre> tags inside a paragraph should be treated as in-line as well. This would possibly be quite useful, but would no doubt break existing pages. It is also conceptually a bit confusing and may cause problems with the default styling rules (which add padding and borders etc. which may look pretty bad for in-line elements). d) I don't think this is a good idea - it almost certainly isn't what was wanted and makes the problem harder to track down. e) The one I would choose if (c) is not viable.
- Mark Clements (HappyDog)