Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/266937
Change subject: Cleanup of the *attribute_preprocessor_text$ formatting ...................................................................... Cleanup of the *attribute_preprocessor_text$ formatting * This shouldn't be a change of behaviour though. * The inline_break that was removed is unnecessary (as we added the |). The whole point of the first expression is a fast pass before breaking to check for an inline_break. * The other change is just a switch from chars disallowed to permitted. Change-Id: I36833ff26763f1c6a911beadd6920ad6fe96ced7 --- M lib/wt2html/pegTokenizer.pegjs.txt 1 file changed, 11 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/37/266937/1 diff --git a/lib/wt2html/pegTokenizer.pegjs.txt b/lib/wt2html/pegTokenizer.pegjs.txt index 2e48227..02757b0 100644 --- a/lib/wt2html/pegTokenizer.pegjs.txt +++ b/lib/wt2html/pegTokenizer.pegjs.txt @@ -2020,12 +2020,10 @@ // Attribute values with preprocessor support attribute_preprocessor_text - = r:( $(!inline_breaks [^=<>{}\n\r&'"\t/ \-])+ + = r:( $[^{}&<\-'"\r\n|=>\t /]+ / !inline_breaks !'/>' - s:( directive - / [&%/{}\-] - ) { return s; } + s:( directive / [{}&<\-/|] ) { return s; } )+ { return tu.flattenString(r); } @@ -2035,9 +2033,7 @@ = r:( $[^{}&<\-'/>]+ / !inline_breaks !'/>' - s:( directive - / [{}&<\-/] - ) { return s; } + s:( directive / [{}&<\-/] ) { return s; } )* { return tu.flattenString(r); } @@ -2047,21 +2043,18 @@ = r:( $[^{}&<\-"/>]+ / !inline_breaks !'/>' - s:( directive - / [{}&<\-/] - ) { return s; } + s:( directive / [{}&<\-/] ) { return s; } )* { return tu.flattenString(r); } // Variants with the entire attribute on a single line table_attribute_preprocessor_text - = r:( $[^=<>\n\r&'"\t \[\]{}/\-|!]+ - / !inline_breaks - t:( directive - / !(space_or_newline / [\[=>|!]) c:. { return c; } - ) { return t; } - )+ { return tu.flattenString(r); } + = r:( $[^{}&<\-!'"\r\n|=>\t /\[\]]+ + / !inline_breaks s:( directive / [{}&<\-'"/\]] ) { return s; } + )+ { + return tu.flattenString(r); + } // The stop set is '\r\n| which matches table_att_value. // n.b. ! is a permissible char. We only break on !! in th, enforced by the @@ -2070,7 +2063,7 @@ = r:( $[^{}&<\-!'\r\n|]+ / !inline_breaks s:( directive / $[{}&<\-!] ) { return s; } )* { - return tu.flattenString(r); + return tu.flattenString(r); } // The stop set is "\r\n| which matches table_att_value. @@ -2080,7 +2073,7 @@ = r:( $[^{}&<\-!"\r\n|]+ / !inline_breaks s:( directive / $[{}&<\-!] ) { return s; } )* { - return tu.flattenString(r); + return tu.flattenString(r); } // Special-case support for those pipe templates -- To view, visit https://gerrit.wikimedia.org/r/266937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36833ff26763f1c6a911beadd6920ad6fe96ced7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra <abrea...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits