Board Thread:Support Requests - Getting Technical/@comment-44043-20121214030806/@comment-5209426-20121214182729

That would be a difficult undertaking, wikitext is basically unspecified so is practically unparseable.

I've written a script that enforces signatures on talk pages and the old style forum system which you can see here: w:c:dev:SignatureCheck. That may be helpful as a starting point; however, bold and italics are one of the more complex parts of wikitext. There are all sorts of special edge-cases that make it hard to tell when something is italic or bold or neither, and that's ignoring the possibility of.

Ironically, this is actually easier to check using the Visual Editor since you can just look at the editor's active HTML content and see the effective CSS values to determine if the text is being italicised or not. The Source Editor is almost intractable, I'm rather doubtful it can be done reliably [Maybe AJAX to the parser API then examine the resulting HTML before allowing the publish button to work, it would be slow as heck though, since you'd end up submitting the page to the server twice].

IMHO, a better solution would be either to write a script that scans the page and fixes all the links when the page is viewed, or to just write a bunch of CSS like: