cmark

My personal build of CMark ✏️

Commit
3ec699716c8448727df43bbd4d847cfbaa37017d
Parent
abc95bdfa1fd4f4ffb5b0727aec34791a6e472e5
Author
John MacFarlane <jgm@berkeley.edu>
Date

Renamed javascript implementation to commonmark.js.

Diffstat

4 files changed, 16 insertions, 17 deletions

Status File Name N° Changes Insertions Deletions
Modified Makefile 10 5 5
Modified README.md 9 4 5
Modified js/index.html 12 6 6
Modified narrative.md 2 1 1
diff --git a/Makefile b/Makefile
@@ -32,8 +32,8 @@ spec.pdf: spec.md template.tex specfilter.hs
 test: spec.txt
 	perl runtests.pl $< $(PROG)
 
-js/stmd.js: js/lib/index.js ${JSMODULES}
-	browserify --standalone stmd $< -o $@
+js/commonmark.js: js/lib/index.js ${JSMODULES}
+	browserify --standalone commonmark $< -o $@
 
 testjs: spec.txt
 	node js/test.js
@@ -62,7 +62,7 @@ $(SRCDIR)/html/html_unescape.h: $(SRCDIR)/html/html_unescape.gperf
 
 .PHONY: leakcheck clean fuzztest dingus upload jshint test testjs benchjs
 
-dingus: js/stmd.js
+dingus: js/commonmark.js
 	cd js && echo "Starting dingus server at http://localhost:9000" && python -m SimpleHTTPServer 9000
 
 leakcheck: $(PROG)
@@ -75,7 +75,7 @@ fuzztest:
 	for i in `seq 1 10`; do \
 	  time cat /dev/urandom | head -c 100000 | iconv -f latin1 -t utf-8 | $(PROG) >/dev/null; done
 
-update-site: spec.html narrative.html js/stmd.js
+update-site: spec.html narrative.html js/commonmark.js
 	cp spec.html _site/
 	cp narrative.html _site/index.html
 	cp -r js/* _site/js/
@@ -83,7 +83,7 @@ update-site: spec.html narrative.html js/stmd.js
 
 clean:
 	-rm -f test $(SRCDIR)/*.o $(SRCDIR)/scanners.c $(SRCDIR)/html/*.o
-	-rm js/stmd.js
+	-rm js/commonmark.js
 	-rm -rf *.dSYM
 	-rm -f README.html
 	-rm -f spec.md fuzz.txt spec.html
diff --git a/README.md b/README.md
@@ -2,8 +2,7 @@ CommonMark
 ==========
 
 CommonMark is a [specification of Markdown syntax][the spec],
-together with BSD3-licensed implementations (`cmark`) in C and
-JavaScript.
+together with BSD3-licensed implementations in C and JavaScript.
 
 The implementations
 -------------------
@@ -23,8 +22,8 @@ tarball.)
 
 The JavaScript implementation is a single JavaScript file, with
 no dependencies, that can be linked to in an HTML page.  (To build,
-it, do `make js/stmd.js`---this requires `browserify`, which you can
-get using `npm install -g browserify`.) A command-line
+it, do `make js/commonmark.js`---this requires `browserify`, which you
+can get using `npm install -g browserify`.) A command-line
 version (using `node.js`) is also provided (`js/bin/markdown`), and
 there is a "dingus" for playing with it interactively.  (`make dingus`
 will start this.)
@@ -40,7 +39,7 @@ sanitizer to protect against
 [The spec] contains over 450 embedded examples which serve as conformance
 tests.  To run the tests for `cmark`, do `make test`.  To run them for
 another Markdown program, say `myprog`, do `make test PROG=myprog`.  To
-run the tests for `stmd.js`, do `make testjs`.
+run the tests for `commonmark.js`, do `make testjs`.
 
 [The spec]:  http://jgm.github.io/stmd/spec.html
 
diff --git a/js/index.html b/js/index.html
@@ -2,15 +2,15 @@
 <html lang="en">
 <head>
   <meta charset="utf-8">
-  <title>stmd.js demo</title>
+  <title>commonmark.js demo</title>
   <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
   <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
   <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
-  <script src="stmd.js"></script>
+  <script src="commonmark.js"></script>
   <script type="text/javascript">
 
-var writer = new stmd.HtmlRenderer();
-var reader = new stmd.DocParser();
+var writer = new commonmark.HtmlRenderer();
+var reader = new commonmark.DocParser();
 
 $(document).ready(function() {
   $(".timing").hide();
@@ -28,7 +28,7 @@ $(document).ready(function() {
       // $("#html").text(result);
       $("#preview").html(result);
       $("#html").text(result);
-      $("#ast").text(stmd.ASTRenderer(parsed));
+      $("#ast").text(commonmark.ASTRenderer(parsed));
       $("#rendertime").text(renderTime);
   };
   var parseAndRender = function () {
@@ -77,7 +77,7 @@ $(document).ready(function() {
 <div class="container">
   <div class="row">
     <div class="col-md-6">
-      <h1>stmd.js dingus</h1>
+      <h1>commonmark.js dingus</h1>
     </div>
     <div class="col-md-4">
       <ul class="nav nav-tabs" role="tablist">
diff --git a/narrative.md b/narrative.md
@@ -4,7 +4,7 @@ title: CommonMark
 
 CommonMark is a [specification of Markdown
 syntax](http://jgm.github.io/stmd/spec.html), together with
-BSD3-licensed implementations (`cmark`) in C and JavaScript. The source
+BSD3-licensed implementations in C and JavaScript. The source
 for the spec and the two implementations can be found in [this
 repository](http://github.com/jgm/stmd).