jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  GWicke: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I651045d01cd735ed0a531d5f01affd327fbff899
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to