Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/314437
Change subject: Remove the .txt from pegTokenizer.pegjs ...................................................................... Remove the .txt from pegTokenizer.pegjs Change-Id: I6809513c0811d0f0a72692aaf657f0d8c09110da --- M lib/html2wt/DOMHandlers.js M lib/html2wt/WikitextSerializer.js R lib/wt2html/pegTokenizer.pegjs M lib/wt2html/tokenizer.js 4 files changed, 5 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/37/314437/1 diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js index 4c80a83..25cf472 100644 --- a/lib/html2wt/DOMHandlers.js +++ b/lib/html2wt/DOMHandlers.js @@ -943,7 +943,7 @@ // optional whitespace) since empty-lines sail through all // handlers without being affected. // - // See empty_line_with_comments rule in pegTokenizer.pegjs.txt + // See empty_line_with_comments rule in pegTokenizer.pegjs // // We could use 'split' to split content into lines and // selectively add indentation, but the code will get diff --git a/lib/html2wt/WikitextSerializer.js b/lib/html2wt/WikitextSerializer.js index ea47a61..c0cfb08 100644 --- a/lib/html2wt/WikitextSerializer.js +++ b/lib/html2wt/WikitextSerializer.js @@ -297,7 +297,7 @@ this.getAttributeValue(node, kv.k, v) ).spread(function(kk, vv) { // Remove encapsulation from protected attributes - // in pegTokenizer.pegjs.txt:generic_newline_attribute + // in pegTokenizer.pegjs:generic_newline_attribute kk = kk.replace(/^data-x-/i, ''); if (vv.length > 0) { if (!vInfo.fromsrc) { diff --git a/lib/wt2html/pegTokenizer.pegjs.txt b/lib/wt2html/pegTokenizer.pegjs similarity index 99% rename from lib/wt2html/pegTokenizer.pegjs.txt rename to lib/wt2html/pegTokenizer.pegjs index b8dbdba..7b9a197 100644 --- a/lib/wt2html/pegTokenizer.pegjs.txt +++ b/lib/wt2html/pegTokenizer.pegjs @@ -2064,6 +2064,3 @@ // SSS FIXME: what about |{{!}} and {{!}}| pipe_pipe = "||" / "{{!}}{{!}}" - -/* Tabs do not mix well with the hybrid rule syntax */ -/* vim: set filetype=javascript expandtab ts=4 sw=4 cindent : */ diff --git a/lib/wt2html/tokenizer.js b/lib/wt2html/tokenizer.js index 885e050..244c4fd 100644 --- a/lib/wt2html/tokenizer.js +++ b/lib/wt2html/tokenizer.js @@ -1,6 +1,6 @@ /** * Tokenizer for wikitext, using PEG.js and a separate PEG grammar file - * (pegTokenizer.pegjs.txt) + * (pegTokenizer.pegjs) * * Use along with a HTML5TreeBuilder and the DOMPostProcessor(s) for HTML * output. @@ -25,7 +25,7 @@ /** * Includes passed to the tokenizer, so that it does not need to require those * on each call. They are available as pegArgs.pegIncludes, and are unpacked - * in the head of pegTokenizer.pegjs.txt. + * in the head of pegTokenizer.pegjs. */ var pegIncludes = { defines: require('./parser.defines.js'), @@ -64,7 +64,7 @@ PegTokenizer.prototype.initTokenizer = function() { // Construct a singleton static tokenizer. - var pegSrcPath = path.join(__dirname, 'pegTokenizer.pegjs.txt'); + var pegSrcPath = path.join(__dirname, 'pegTokenizer.pegjs'); this.src = fs.readFileSync(pegSrcPath, 'utf8'); // FIXME: Don't report infinite loops, i.e. repeated subexpressions which -- To view, visit https://gerrit.wikimedia.org/r/314437 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6809513c0811d0f0a72692aaf657f0d8c09110da Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra <abrea...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits