From 0bea9fdfbb0fed7673f062ab8c64fd422e9b7d9c Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Fri, 3 Feb 2012 13:10:04 +0000 Subject: [PATCH] Fix nowiki tokenization regression introduced r110495 --- modules/parser/pegTokenizer.pegjs.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/parser/pegTokenizer.pegjs.txt b/modules/parser/pegTokenizer.pegjs.txt index 2560f0763a..a58a66dd2c 100644 --- a/modules/parser/pegTokenizer.pegjs.txt +++ b/modules/parser/pegTokenizer.pegjs.txt @@ -879,24 +879,31 @@ pre nowiki = "" nc:nowiki_content "" { - // console.log(pp(nc)); + //console.log( 'full nowiki return: ' + pp(nc)); return nc; } / "" { //console.log('nowiki fallback'); return ['']; } - / "" { return ['']; } + / "" { + //console.log('nowiki end fallback'); + return ['']; + } nowiki_content = ts:( t:[^<]+ { return t.join('') } / "]* ">" p2:nowiki_content "" { //console.log('nested pre in nowiki'); - return [""], [p2[0].value], [""]).join(''); + return [""], p2, [""]).join(''); } - / (!("" / "") c:. {return c}) + / (!("" / "pre>")) c:. { + //console.log('nowiki: single char' + c); + return c; + }) )* { // return nowiki tags as well? + //console.log('nowiki_content: return' + pp(ts)); return [ts.join('')]; }