Last modified: 2013-10-07 20:33:41 UTC
$ echo "'''<sub>Foo'''Bar</sub>" | node parse.js | node parse.js --html2wt '''<sub>Foo'''Bar $ echo "'''[[DTW|D'''etroit]]" | node parse.js | node parse.js --html2wt WARNING: DSR inconsistency: cs/s mismatch for node: A s: 9; cs: 20 '''[[DTW|D]]'''[[DTW|etroit]]
https://gerrit.wikimedia.org/r/#/c/83216/ will fix the second example: [subbu@earth lib] echo "'''[[DTW|D'''etroit]]" | node parse.js | node parse.js --html2wt '''[[DTW|D'''etroit''']]'''
Verified that the second case is fixed now that 83216 is merged. In the first case I'd expect the output to be "'''<sub>Foo</sub>'''Bar". For some reason the autoInsertedEnd marker seems to be used here despite editMode being true, which looks like a bug.
Tidy seems to handle sub mis-nestings different from the HTML spec: https://www.mediawiki.org/wiki/User:GWicke/Test/Sub I'm inclined to follow the HTML5 spec in this case.