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="<(?!/|$normaltags)[^&]+>[^&]+<!--[^&-]*</(?!$normaltags)((?!>).)+>" |
| 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 |
1 | 29 | + native |
Added: svn:executable |
2 | 30 | + * |
Index: trunk/extensions/VisualEditor/tests/parser/dumpGrepper.js |
— | — | @@ -29,8 +29,6 @@ |
30 | 30 | } |
31 | 31 | } ).argv; |
32 | 32 | |
33 | | - console.log( argv ); |
34 | | - |
35 | 33 | var flags = ''; |
36 | 34 | if(argv.i) { |
37 | 35 | flags += 'i'; |