Hi Wang,
On Aug 15, 2008, at 8:46 PM, Wang Ning wrote:
Hi Vincent,
I run a test case for <del> and it does not work.
That's probably a problem in the wikimodel XHTML parser.
In XDOMGeneratorListener#endFormat(WikiFormat format) you use
(format.hasStyle(IWemConstants.STRIKE)) to handle the strickout, but
both <s> and <strike> are deprecated in xhtml. Why not use
(format.hasStyle(IWemConstants.DEL))?
Wikimodel sets STRIKE for striked out. Check XWikiScanner.jj:
t = getFORMAT_SYMBOL()
{
str = t.image.trim();
WikiStyle style = null;
if ("__".equals(str) || "**".equals(str)) {
style = IWikiScannerContext.STRONG;
} else if ("~~".equals(str)) {
style = IWikiScannerContext.EM;
} else if ("--".equals(str)) {
style = IWikiScannerContext.STRIKE;
}
fContext.onFormat(style);
}
On a related topic I didn't know that <ins> was doing the same thing
as underline so I wonder if it wouldn't be better to use <ins
class="underline"> rather than <span class="underline">.
However I
don't know enough the implications and what's best. If anyone has an
idea please let me know.
Thanks
-Vincent