cmark

My personal build of CMark ✏️

Commit
7b952201086ac93716b7bb4ca8ac2b61237a033d
Parent
ad5cfa746e985a8261646af90fc9e25306b21c55
Author
John MacFarlane <jgm@berkeley.edu>
Date

More stmd -> commonmark changes.

Diffstat

7 files changed, 16 insertions, 16 deletions

Status File Name N° Changes Insertions Deletions
Modified .gitignore 4 2 2
Modified LICENSE 2 1 1
Modified Makefile 4 2 2
Modified js/bench.js 2 1 1
Modified js/bin/markdown 6 3 3
Modified js/lib/index.js 8 4 4
Modified js/test.js 6 3 3
diff --git a/.gitignore b/.gitignore
@@ -29,5 +29,5 @@
 scanners.c
 *.zip
 bstrlib.txt
-stmd.dSYM/*
-stmd
+commonmark.dSYM/*
+commonmark
diff --git a/LICENSE b/LICENSE
@@ -31,7 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 -----
 
-The polyfill for String.fromCodePoint included in stmd.js is
+The polyfill for String.fromCodePoint included in commonmark.js is
 Copyright Mathias Bynens <http://mathiasbynens.be/>
 
 Permission is hereby granted, free of charge, to any person obtaining
diff --git a/Makefile b/Makefile
@@ -2,7 +2,7 @@ CFLAGS?=-g -O3 -Wall -Wextra -std=c99 -Isrc -Wno-missing-field-initializers $(OP
 LDFLAGS?=-g -O3 -Wall -Werror
 SRCDIR?=src
 DATADIR?=data
-BENCHINP?=bench.md
+BENCHINP?=narrative.md
 PROG?=./cmark
 JSMODULES=$(wildcard js/lib/*.js)
 
@@ -69,7 +69,7 @@ leakcheck: $(PROG)
 	cat leakcheck.md | valgrind --leak-check=full --dsymutil=yes $(PROG)
 
 operf: $(PROG)
-	operf $(PROG) <bench.md >/dev/null
+	operf $(PROG) <$(BENCHINP) >/dev/null
 
 fuzztest:
 	for i in `seq 1 10`; do \
diff --git a/js/bench.js b/js/bench.js
@@ -13,7 +13,7 @@ var contents = fs.readFileSync(benchfile, 'utf8');
 
 // var converter = new showdown.converter();
 
-suite.add('stmd markdown->html', function() {
+suite.add('commonmark.js markdown->html', function() {
   var doc = new sm.DocParser().parse(contents);
   var renderer = new sm.HtmlRenderer();
   renderer.renderBlock(doc);
diff --git a/js/bin/markdown b/js/bin/markdown
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 var fs = require('fs');
 var util = require('util');
-var stmd = require('../lib/index.js');
+var commonmark = require('../lib/index.js');
 
 file = process.argv[2] || '/dev/stdin';
 
@@ -9,7 +9,7 @@ fs.readFile(file, 'utf8', function(err, data) {
   if (err) {
     return console.log(err);
   }
-  var parser   = new stmd.DocParser();
-  var renderer = new stmd.HtmlRenderer();
+  var parser   = new commonmark.DocParser();
+  var renderer = new commonmark.HtmlRenderer();
   process.stdout.write(renderer.render(parser.parse(data)));
 });
diff --git a/js/lib/index.js b/js/lib/index.js
@@ -1,12 +1,12 @@
-// stmd.js - CommomMark in JavaScript
+// commonmark.js - CommomMark in JavaScript
 // Copyright (C) 2014 John MacFarlane
 // License: BSD3.
 
 // Basic usage:
 //
-// var stmd = require('stmd');
-// var parser = new stmd.DocParser();
-// var renderer = new stmd.HtmlRenderer();
+// var commonmark = require('commonmark');
+// var parser = new commonmark.DocParser();
+// var renderer = new commonmark.HtmlRenderer();
 // console.log(renderer.render(parser.parse('Hello *world*')));
 
 var util = require('util');
diff --git a/js/test.js b/js/test.js
@@ -1,12 +1,12 @@
 #!/usr/bin/env node
 
 var fs = require('fs');
-var stmd = require('./lib/index.js');
+var commonmark = require('./lib/index.js');
 var ansi = require('./ansi/ansi');
 var cursor = ansi(process.stdout);
 
-var writer = new stmd.HtmlRenderer();
-var reader = new stmd.DocParser();
+var writer = new commonmark.HtmlRenderer();
+var reader = new commonmark.DocParser();
 
 var passed = 0;
 var failed = 0;