r112491 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112490‎ | r112491 | r112492 >
Date:16:51, 27 February 2012
Author:gwicke
Status:deferred
Tags:
Comment:
Add martian-endtags regexp wrapper around dumpGrepper.
Modified paths:
  • /trunk/extensions/VisualEditor/tests/parser/dumpGrepPatterns (added) (history)
  • /trunk/extensions/VisualEditor/tests/parser/dumpGrepPatterns/martian-endtags.sh (added) (history)
  • /trunk/extensions/VisualEditor/tests/parser/dumpGrepper.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/tests/parser/dumpGrepPatterns/martian-endtags.sh
@@ -0,0 +1,27 @@
 2+#!/bin/sh
 3+
 4+# extension tag hooks enabled at en.wikipedia.org
 5+exts="categorytree|charinsert|gallery|hiero|imagemap|inputbox|math|nowiki|poem|pre|ref|references|source|syntaxhighlight|timeline"
 6+
 7+wiki="nowiki|includeonly|noinclude|onlyinclude"
 8+
 9+# just the html5 elements
 10+html5s="a|abbr|address|area|article|aside|audio|b|base|bdi|bdo|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|data|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|menu|meta|meter|nav|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|u|ul|var|video|wbr"
 11+
 12+htmlold="center|font|tt"
 13+
 14+normaltags="$exts|$wiki|$html5s|$htmlold"
 15+
 16+#regexp="<(?!\/|$exts|$htmls)[^>]*>.*?<!--([^<]+|<(\/|$exts|$htmls)[^>]*>)*<\/(?!$exts|$htmls)[^>]*>"
 17+#regexp="&lt;(?!/|$normaltags)[^&]+&gt;[^&]+&lt;!--[^&-]*&lt;/(?!$normaltags)((?!&gt;).)+&gt;"
 18+regexp="</(?=[a-z])(?!$normaltags)[^&]+>"
 19+#regexp="<(?!\/|$exts|$htmls)[^>]*>"
 20+
 21+#echo $regexp
 22+
 23+if [ -z "$1" ];then
 24+ echo "Usage: $0 <xmldump.gz>"
 25+ exit 1
 26+fi
 27+
 28+zcat $1 | node ../dumpGrepper.js -i "$regexp"
Property changes on: trunk/extensions/VisualEditor/tests/parser/dumpGrepPatterns/martian-endtags.sh
___________________________________________________________________
Added: svn:eol-style
129 + native
Added: svn:executable
230 + *
Index: trunk/extensions/VisualEditor/tests/parser/dumpGrepper.js
@@ -29,8 +29,6 @@
3030 }
3131 } ).argv;
3232
33 - console.log( argv );
34 -
3533 var flags = '';
3634 if(argv.i) {
3735 flags += 'i';

Status & tagging log