mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-30 17:14:42 +00:00
Improve comment and general data-* attribute normalization.
This commit is contained in:
parent
b16c295b98
commit
d7537d9777
|
@ -156,7 +156,8 @@ function normalizeHTML(source) {
|
|||
// known-ok differences.
|
||||
function normalizeOut ( out ) {
|
||||
// TODO: Do not strip newlines in pre and nowiki blocks!
|
||||
return out.replace(/\n| data-sourcePos="[^>]+"|<!--[^-]*-->\n?/g, '');
|
||||
return out.replace(/\n| data-[a-zA-Z]+="[^">]+"/g, '')
|
||||
.replace(/<!--.*?-->\n?/gm, '');
|
||||
}
|
||||
|
||||
function formatHTML ( source ) {
|
||||
|
|
Loading…
Reference in a new issue