https://bugzilla.wikimedia.org/show_bug.cgi?id=16294
--- Comment #3 from Nicholas Wilson <[EMAIL PROTECTED]> 2008-12-09 00:47:02 UTC --- Thanks for the feedback. I will add the parser tests soon. The change in naming scheme is causing the current parser tests to all fail, as expected — the correct answers need to be updated for the existing tests (the naming scheme had to be changed because there were a couple of characters not correctly escaped by the old scheme, while the new one is robust). So, for the time being, I have checked and updated the old parser tests, which now work, and I will update the new set of tests when I have added suitably tricksy ones to thoroughly test the new functionality. In fact, a minor syntax change to one of regexps has been needed to properly pass the tests, so it was worth showing them to me. Notes: 1. I agree that regexps are nasty (and slow), but this one is as simple as I think it can get. I am making nearly all my regexps non-greedy, which helps, and the expression is literally just grabbing the tags out of the wikitext which is set above. I can see problems with maintainability, but it should be able to take any wikitext correctly. Ultimately, I am a bit unhappy about the need for this stage, but there seems no way around it, since tag hooks only work on one tag at a time. Implementing ref merging therefore does need a parser stage, and, short of parsing the whole text into a tree, regexps seem the only semi-efficient way of picking out the tags. If the grouping of refs is not optional, then there is a slightly more efficient way of managing this, including simpler regexps, but the great advantage of the way I have done it is that simply commenting out the line where the parser hook is registered (l. 641) removes the whole processing stage, and links are output as normal. (With this line commented out, the patch still works and becomes rather less controversial, with referencesMerge and callbackMerge never used.) 2. This is good. I have some books using this style, and [[Footnote#cite_note-0]] agrees with this use of § and ¶. 3. Sorry; I have just essentially scratch-written the [[probability amplitude]] article, so I have things like [[bra-ket notation]] on the brain. It may look 'cute', but this terminology is actually used by serious physicists! -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
