GWicke has uploaded a new change for review.
https://gerrit.wikimedia.org/r/74581
Change subject: Eat pipe-prefixed broken attributes everywhere
......................................................................
Eat pipe-prefixed broken attributes everywhere
Some pages use attributes named "|-", and not eating those then leads to
foster-parenting of all attributes.
Change-Id: I651045d01cd735ed0a531d5f01affd327fbff899
---
M js/lib/pegTokenizer.pegjs.txt
1 file changed, 3 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid
refs/changes/81/74581/1
diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt
index 0ebc135..881feff 100644
--- a/js/lib/pegTokenizer.pegjs.txt
+++ b/js/lib/pegTokenizer.pegjs.txt
@@ -1751,9 +1751,9 @@
generic_attribute_name
= & { return stops.push( 'equal', true ); }
// quick sanity check before expensive attribute_preprocessor_text_line
- // production. Try to parse on !+ for now, seems to happen in caption
+ // production. Try to parse on |!+ for now, seems to happen in caption
// tokenization (TODO: try to get rid of those too)
- &([a-zA-Z!+] /
+ &([a-zA-Z|!+] /
// Possibly a templated attribute
'{{' [^}]+ '}' /
'<' ('noinclude' / 'onlyinclude' / 'includeonly'))
@@ -1981,9 +1981,7 @@
table_row_tag
= //& { console.warn("table row enter @" + input.substr(pos, 30)); return
true; }
p:pipe dashes:"-"+
- a:(generic_attribute /
- // Ignore pipes in tr attributes
- space* c:'|' { return new KV(c, '') })*
+ a:(generic_attribute)*
tagEndPos:({return pos;})
// handle tables with missing table cells after a row
td:implicit_table_data_tag?
--
To view, visit https://gerrit.wikimedia.org/r/74581
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I651045d01cd735ed0a531d5f01affd327fbff899
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits