diff options
Diffstat (limited to 'js/index.html')
-rw-r--r-- | js/index.html | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/js/index.html b/js/index.html index 05fc216..01afef2 100644 --- 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,6 +28,7 @@ $(document).ready(function() { // $("#html").text(result); $("#preview").html(result); $("#html").text(result); + $("#ast").text(commonmark.ASTRenderer(parsed)); $("#rendertime").text(renderTime); }; var parseAndRender = function () { @@ -76,17 +77,18 @@ $(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-3"> + <div class="col-md-4"> <ul class="nav nav-tabs" role="tablist"> <li class="active"><a href="#preview" role="tab" data-toggle="tab">Preview</a></li> <li><a href="#result" role="tab" data-toggle="tab">HTML</a></li> + <li><a href="#result-ast" role="tab" data-toggle="tab">AST</a></li> </ul> </div> - <div class="col-md-3"> - <p class="timing">Parsed in <span class="timing" id="parsetime"></span> milliseconds.<br/> - Rendered in <span class="timing" id="rendertime"></span> milliseconds.</p> + <div class="col-md-2"> + <p class="timing">Parsed in <span class="timing" id="parsetime"></span> ms.<br> + Rendered in <span class="timing" id="rendertime"></span> ms.</p> </div> </div> <div class="row"> @@ -101,6 +103,9 @@ $(document).ready(function() { <div id="result" class="tab-pane"> <pre id="htmlpre"><code id="html"></code></pre> </div> + <div id="result-ast" class="tab-pane"> + <pre id="astpre"><code id="ast"></code></pre> + </div> </div> </div> </div> |