Subramanya Sastry has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/381894 )
Change subject: Minor: Rename BlockTags to HTML4BlockTags
......................................................................
Minor: Rename BlockTags to HTML4BlockTags
HTML5 does not have a notion of block tags
Change-Id: Ie5bdf914276af46912f5b71226b8a30d82c415f2
---
M lib/config/WikitextConstants.js
M lib/utils/Util.js
M lib/wt2html/pp/handlers/linter.js
3 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/94/381894/1
diff --git a/lib/config/WikitextConstants.js b/lib/config/WikitextConstants.js
index cb603c9..a686058 100644
--- a/lib/config/WikitextConstants.js
+++ b/lib/config/WikitextConstants.js
@@ -197,7 +197,7 @@
// From
https://developer.mozilla.org/en-US/docs/HTML/Block-level_elements
// However, you probably want to use `Util.isBlockTag()`, where
some
// exceptions are being made.
- BlockTags: new Set([
+ HTML4BlockTags: new Set([
'DIV', 'P',
// tables
'TABLE', 'TBODY', 'THEAD', 'TFOOT', 'CAPTION', 'TH',
'TR', 'TD',
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index f66f734..acfa500 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -429,7 +429,7 @@
*/
isBlockTag: function(name) {
name = name.toUpperCase();
- return name !== 'VIDEO' && Consts.HTML.BlockTags.has(name);
+ return name !== 'VIDEO' && Consts.HTML.HTML4BlockTags.has(name);
},
/**
diff --git a/lib/wt2html/pp/handlers/linter.js
b/lib/wt2html/pp/handlers/linter.js
index 3691414..326706b 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -61,7 +61,7 @@
tagsWithChangedMisnestingBehavior = new Set();
Consts.HTML.HTML5Tags.forEach(function(t) {
if (Consts.Sanitizer.TagWhiteList.has(t) &&
- !Consts.HTML.BlockTags.has(t) &&
+ !Consts.HTML.HTML4BlockTags.has(t) &&
!Consts.HTML.FormattingTags.has(t) &&
!Consts.HTML.VoidTags.has(t)
) {
--
To view, visit https://gerrit.wikimedia.org/r/381894
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5bdf914276af46912f5b71226b8a30d82c415f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits