jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/362219 )

Change subject: More precise nowiki escape for table-like LC markup.
......................................................................


More precise nowiki escape for table-like LC markup.

Change-Id: Ie4339572d68ae469703bd107ec930ffccf916ffe
---
M lib/html2wt/ConstrainedText.js
M tests/parserTests.txt
2 files changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/lib/html2wt/ConstrainedText.js b/lib/html2wt/ConstrainedText.js
index 3ebf4ec..cd2a78c 100644
--- a/lib/html2wt/ConstrainedText.js
+++ b/lib/html2wt/ConstrainedText.js
@@ -467,7 +467,7 @@
                text: text,
                node: node,
                // at sol vertical bars immediately preceding cause problems in 
tables
-               badPrefix: /\|$/,
+               badPrefix: /^\|$/,
        });
 };
 inherits(LanguageVariantText, RegExpConstrainedText);
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 294192f..909d036 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -22106,11 +22106,13 @@
 {|
 |-
 |<span class="x">Foo</span>-{Bar}-
+||<span class="x">Foo</span>-{Bar}-
 |}
 !! wikitext/edited
 {|
 |-
 |<nowiki/>-{Bar}-
+||-{Bar}-
 |}
 !! end
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4339572d68ae469703bd107ec930ffccf916ffe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to