Sbailey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403763 )

Change subject: Added <section and <indicator tag handling to code that 
processes tags inside attributes in the testing system.
......................................................................

Added <section and <indicator tag handling to code that processes tags
inside attributes in the testing system.

Change-Id: I2f381a1e76f7592f61a5a5999a8d00c784ad2abc
---
M tests/mockAPI.js
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/63/403763/1

diff --git a/tests/mockAPI.js b/tests/mockAPI.js
index 1e16673..de63339 100644
--- a/tests/mockAPI.js
+++ b/tests/mockAPI.js
@@ -431,8 +431,14 @@
 };
 
 var parse = function(text, onlypst) {
-       var html = onlypst ? text.replace(/\{\{subst:echo\|([^}]+)\}\}/, "$1") 
: '\n';
-       return { text: html };
+    // Special case several tags that can be specified as part of a attribute
+       if (onlypst) {
+               return text.replace(/\{\{subst:echo\|([^}]+)\}\}/, "$1");
+       }       else {
+               if (/<indicator|<section/.test(text)) {
+                       return { text: '\n' };
+               }
+       }
 };
 
 var missingTitles = new Set([

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f381a1e76f7592f61a5a5999a8d00c784ad2abc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Sbailey <[email protected]>

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

Reply via email to