From d937eec5f3e1e462b61de746908a65ed5303f575 Mon Sep 17 00:00:00 2001 From: Vitaly Puzrin Date: Sun, 26 Oct 2014 03:40:20 +0300 Subject: [PATCH] Renamed stmd -> commonmark --- Makefile | 2 +- README.md | 2 +- .../implementations/commonmark-reference/index.js | 10 ++++++++++ .../{stmd => commonmark-reference}/stmd.js | 0 benchmark/implementations/stmd/index.js | 10 ---------- benchmark/profile.js | 2 +- benchmark/samples/inline-entity.md | 2 +- benchmark/samples/inline-html.md | 2 +- lib/common/html_blocks.js | 4 ++-- lib/common/url_schemas.js | 4 ++-- support/specsplit.js | 2 +- test/{stmd.js => commonmark.js} | 4 ++-- test/fixtures/{stmd => commonmark}/bad.txt | 0 test/fixtures/{stmd => commonmark}/good.txt | 0 test/fixtures/{stmd => commonmark}/spec.txt | 0 test/fixtures/remarkable/commonmark_extras.txt | 3 ++- 16 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 benchmark/implementations/commonmark-reference/index.js rename benchmark/implementations/{stmd => commonmark-reference}/stmd.js (100%) delete mode 100644 benchmark/implementations/stmd/index.js rename test/{stmd.js => commonmark.js} (59%) rename test/fixtures/{stmd => commonmark}/bad.txt (100%) rename test/fixtures/{stmd => commonmark}/good.txt (100%) rename test/fixtures/{stmd => commonmark}/spec.txt (100%) diff --git a/Makefile b/Makefile index 6d229e9..6284b18 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ lint: test: lint NODE_ENV=test mocha -R spec echo "CommonMark stat:\n" - ./support/specsplit.js test/fixtures/stmd/spec.txt + ./support/specsplit.js test/fixtures/commonmark/spec.txt gh-pages: diff --git a/README.md b/README.md index 7b14403..617d96d 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ during this project's development. Links: -1. https://github.com/jgm/stmd - reference CommonMark implementations in C & JS, +1. https://github.com/jgm/CommonMark - reference CommonMark implementations in C & JS, also contains latest spec & online demo. 2. http://talk.commonmark.org - CommonMark forum, good place to collaborate developpers efforts. diff --git a/benchmark/implementations/commonmark-reference/index.js b/benchmark/implementations/commonmark-reference/index.js new file mode 100644 index 0000000..64792b2 --- /dev/null +++ b/benchmark/implementations/commonmark-reference/index.js @@ -0,0 +1,10 @@ +'use strict' + +var commonmark = require('./stmd'); +var parser = new commonmark.DocParser(); +var renderer = new commonmark.HtmlRenderer(); + +exports.run = function(data) { + return renderer.render(parser.parse(data)); +} + diff --git a/benchmark/implementations/stmd/stmd.js b/benchmark/implementations/commonmark-reference/stmd.js similarity index 100% rename from benchmark/implementations/stmd/stmd.js rename to benchmark/implementations/commonmark-reference/stmd.js diff --git a/benchmark/implementations/stmd/index.js b/benchmark/implementations/stmd/index.js deleted file mode 100644 index 66d39fb..0000000 --- a/benchmark/implementations/stmd/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' - -var stmd = require('./stmd'); -var parser = new stmd.DocParser(); -var renderer = new stmd.HtmlRenderer(); - -exports.run = function(data) { - return renderer.render(parser.parse(data)); -} - diff --git a/benchmark/profile.js b/benchmark/profile.js index a3f6b73..7dd9bba 100755 --- a/benchmark/profile.js +++ b/benchmark/profile.js @@ -13,7 +13,7 @@ var md = new Remarkable({ }); //var data = fs.readFileSync(path.join(__dirname, '/samples/lorem1.txt'), 'utf8'); -var data = fs.readFileSync(path.join(__dirname, '../test/fixtures/stmd/spec.txt'), 'utf8'); +var data = fs.readFileSync(path.join(__dirname, '../test/fixtures/commonmark/spec.txt'), 'utf8'); for (var i = 0; i < 20; i++) { md.render(data); diff --git a/benchmark/samples/inline-entity.md b/benchmark/samples/inline-entity.md index 2a0c7b3..da095ed 100644 --- a/benchmark/samples/inline-entity.md +++ b/benchmark/samples/inline-entity.md @@ -1,4 +1,4 @@ -stmd tests: +entities:   & © Æ Ď ¾ ℋ ⅆ ∲ diff --git a/benchmark/samples/inline-html.md b/benchmark/samples/inline-html.md index a28e618..f6e6341 100644 --- a/benchmark/samples/inline-html.md +++ b/benchmark/samples/inline-html.md @@ -1,4 +1,4 @@ -Taking stmd tests from the spec for benchmarking here: +Taking commonmark tests from the spec for benchmarking here: diff --git a/lib/common/html_blocks.js b/lib/common/html_blocks.js index 91f5f3b..96848e0 100644 --- a/lib/common/html_blocks.js +++ b/lib/common/html_blocks.js @@ -1,5 +1,5 @@ -// List of valid html blocks names, accorting to stmd spec -// http://jgm.github.io/stmd/spec.html#html-blocks +// List of valid html blocks names, accorting to commonmark spec +// http://jgm.github.io/CommonMark/spec.html#html-blocks 'use strict'; diff --git a/lib/common/url_schemas.js b/lib/common/url_schemas.js index e1c5cca..bd71c25 100644 --- a/lib/common/url_schemas.js +++ b/lib/common/url_schemas.js @@ -1,5 +1,5 @@ -// List of valid url schemas, accorting to stmd spec -// http://jgm.github.io/stmd/spec.html#autolinks +// List of valid url schemas, accorting to commonmark spec +// http://jgm.github.io/CommonMark/spec.html#autolinks 'use strict'; diff --git a/support/specsplit.js b/support/specsplit.js index 142dbe7..e6a5fb1 100755 --- a/support/specsplit.js +++ b/support/specsplit.js @@ -1,7 +1,7 @@ #!/usr/bin/env node /*eslint no-console:0*/ -// Fixtures generator from stmd specs. Split spec to working / not working +// Fixtures generator from commonmark specs. Split spec to working / not working // examples, or show total stat. 'use strict'; diff --git a/test/stmd.js b/test/commonmark.js similarity index 59% rename from test/stmd.js rename to test/commonmark.js index 8cbb541..c5a3f47 100644 --- a/test/stmd.js +++ b/test/commonmark.js @@ -9,8 +9,8 @@ var utils = require('./utils'); var Remarked = require('../'); -describe('stmd', function () { +describe('CommonMark', function () { var md = new Remarked('commonmark'); - utils.addSpecTests(path.join(__dirname, 'fixtures/stmd/good.txt'), md); + utils.addSpecTests(path.join(__dirname, 'fixtures/commonmark/good.txt'), md); }); diff --git a/test/fixtures/stmd/bad.txt b/test/fixtures/commonmark/bad.txt similarity index 100% rename from test/fixtures/stmd/bad.txt rename to test/fixtures/commonmark/bad.txt diff --git a/test/fixtures/stmd/good.txt b/test/fixtures/commonmark/good.txt similarity index 100% rename from test/fixtures/stmd/good.txt rename to test/fixtures/commonmark/good.txt diff --git a/test/fixtures/stmd/spec.txt b/test/fixtures/commonmark/spec.txt similarity index 100% rename from test/fixtures/stmd/spec.txt rename to test/fixtures/commonmark/spec.txt diff --git a/test/fixtures/remarkable/commonmark_extras.txt b/test/fixtures/remarkable/commonmark_extras.txt index 19222ff..89624b6 100644 --- a/test/fixtures/remarkable/commonmark_extras.txt +++ b/test/fixtures/remarkable/commonmark_extras.txt @@ -41,7 +41,7 @@ test . -Link label has priority over emphasis (not covered by stmd tests): +Link label has priority over emphasis (not covered by commonmark tests): . [**link]()** @@ -52,6 +52,7 @@ Link label has priority over emphasis (not covered by stmd tests):

**link**

. + Issue #55: .