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

Change subject: Inline generic_attribute_newline_value and table_attribute_value
......................................................................


Inline generic_attribute_newline_value and table_attribute_value

 * They only have one use site each.  Also, that use site isn't expecting
   an array to be returned, so fix that up as well.

Change-Id: Ie7b3fb7451ed4a570cec316e2277c09cff9a9784
---
M lib/wt2html/pegTokenizer.pegjs.txt
1 file changed, 2 insertions(+), 16 deletions(-)

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



diff --git a/lib/wt2html/pegTokenizer.pegjs.txt 
b/lib/wt2html/pegTokenizer.pegjs.txt
index 22c9577..434d7cd 100644
--- a/lib/wt2html/pegTokenizer.pegjs.txt
+++ b/lib/wt2html/pegTokenizer.pegjs.txt
@@ -1215,8 +1215,7 @@
     namePos0:("" { return endOffset(); })
     name:generic_attribute_name
     namePos:("" { return endOffset(); })
-    valueData:( space_or_newline*
-        v:generic_attribute_newline_value { return v; })?
+    valueData:(space_or_newline* "=" v:generic_att_value? { return v; })?
 {
     var res;
     // Encapsulate protected attributes.
@@ -1242,8 +1241,7 @@
     namePos0:("" { return endOffset(); })
     name:table_attribute_name
     namePos:("" { return endOffset(); })
-    valueData:(optionalSpaceToken
-        v:table_attribute_value { return v; })?
+    valueData:(optionalSpaceToken "=" v:table_att_value? { return v; })?
 {
     var res;
     // Encapsulate protected attributes.
@@ -1301,18 +1299,6 @@
         ) { return t; }
       )+ {
     return tu.flattenString(r);
-  }
-
-// A generic attribute, possibly spanning multiple lines.
-generic_attribute_newline_value
-  = "=" v:generic_att_value? {
-      return v === null ? [] : v;
-  }
-
-// A generic but single-line attribute.
-table_attribute_value
-  = "=" v:table_att_value? {
-      return v === null ? [] : v;
   }
 
 // Attribute value, quoted variants can span multiple lines.

-- 
To view, visit https://gerrit.wikimedia.org/r/310441
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7b3fb7451ed4a570cec316e2277c09cff9a9784
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <abrea...@wikimedia.org>
Gerrit-Reviewer: C. Scott Ananian <canan...@wikimedia.org>
Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to