--- takahashi.xul 2006/06/09 22:03:42 4 +++ takahashi.xul 2006/06/09 22:21:33 5 @@ -737,7 +737,7 @@ var linksRegExp = this.makePhraseRegExp('^([^%O]+)?%O%O(([^|]+)?\\||)([^%C]+)%C%C', ''); - var wikiRegExp = this.makePhraseRegExp('^([^%O]+)?%O([0-9]*)([:\/\*_])([^%C]+)[:\/\*_]%C', ''); + var wikiRegExp = this.makePhraseRegExp('^([^%O]+)?%O([0-9]*)([#!])?([:\/\*_])([^%C]+)[:\/\*_]%C', ''); var montaRegExp = this.makePhraseRegExp('^([^%O]+)?%O([^%C]+)%C', ''); @@ -886,16 +886,18 @@ // modify font size and wiki-style else if (wikiRegExp.test(line)) { fragment.lastChild.appendChild(document.createElement('description')); - fragment.lastChild.lastChild.setAttribute('value', RegExp.$4); + fragment.lastChild.lastChild.setAttribute('value', RegExp.$5); var style = 'font-size:'+ ( RegExp.$2 || 100 ) +'%'; - if (RegExp.$3 == '*') { + if (RegExp.$4 == '*') { style += '; font-weight: bold;'; - } else if (RegExp.$3 == '/') { + } else if (RegExp.$4 == '/') { style += '; font-style: italic;'; - } else if (RegExp.$3 == '_') { + } else if (RegExp.$4 == '_') { style += '; text-decoration: underline;'; } fragment.lastChild.lastChild.setAttribute('style', style); + if (RegExp.$3 == '!') fragment.lastChild.lastChild.setAttribute('class', 'em-text'); + else if (RegExp.$3 == '#') fragment.lastChild.lastChild.setAttribute('class', 'preformatted-text'); } // Monta