From 7cff5fceaa8f0420e0e962a7f1caf10dac7773dd Mon Sep 17 00:00:00 2001 From: neocotic Date: Mon, 4 Feb 2013 15:07:23 +0000 Subject: [PATCH 1/3] added man page --- docs/md.1 | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 3 +- 2 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 docs/md.1 diff --git a/docs/md.1 b/docs/md.1 new file mode 100644 index 0000000..ba43781 --- /dev/null +++ b/docs/md.1 @@ -0,0 +1,102 @@ +.TH MD 1 "February 2013" "" "General Commands Manual" + +.SH NAME +.B md +\- HTML to Markdown converter + +.SH SYNOPSIS + +.B md +[ +.B \-adlp +] +[ +.B \-o +.I output_dir +] +[ +.I paths +] +.br + [ +.B \-dp +] +[ +.B \-e +.I html +] +.br + [ +.B \-v +] + +.SH DESCRIPTION + +html.md is a JavaScript library which allows HTML to be +converted into valid Markdown. It also supports file +systems to provide a complete command line utility. + +.SH OPTIONS + +.TP 15 +.B \-a/\-\-absolute +Always use absolute URLs for converted links. + +.TP +.B \-d/\-\-debug +Debug mode. Causes +.B md +to print debugging messages about its progress. + +.HP +.B \-e/\-\-eval +.I html +.br +Specifies the HTML string to be evaluated. + +.TP +.B \-l/\-\-long-ext +Generated Markdown files should have the long file +extension. When used, files will be created in the +.I output_dir +will have a .markdown file extension. + +.HP +.B \-o/\-\-output +.I output_dir +.br +Specifies the output directory to which generated +Markdown files will be created. + +.TP +.B \-p/\-\-print +Print out converted Markdown to the +.B stdout +stream. + +.TP +.B \-v/\-\-version +Display the version number and exit. + +.SH BUGS + +Inline HTML is not yet supported in the resulting +Markdown. + +.SH CAVEATS + +It is always recommended to pair option +.B \-p +with +.B \-e +otherwise +.B md +does all of the work but you won't see the outcome. + +.SH AUTHOR + +Alasdair Mercer < +.I mercer.alasdair@gmail.com +> ( +.I http://neocotic.com +) diff --git a/package.json b/package.json index 0708ddd..81656b7 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,9 @@ , "scripts": { "test": "tap ./test" } + , "man": "./docs/md.1" , "bin": { "md": "./bin/md" } , "main": "./lib/md" -} \ No newline at end of file +} From d44e436c5838226b387ff92ca0ad2fe6887fe55a Mon Sep 17 00:00:00 2001 From: neocotic Date: Mon, 4 Feb 2013 15:16:32 +0000 Subject: [PATCH 2/3] fixes #14 by only creating files appropriately --- bin/md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/md b/bin/md index 8018cd7..e1a8913 100755 --- a/bin/md +++ b/bin/md @@ -109,7 +109,7 @@ parseHtml = (file, input, base) -> output = md input, opts if opts.print console.log output - else + else if file writeMarkdown file, output, base catch err exit 1, err instanceof Error and err.stack or "ERROR: #{err}" From dde8a87cee5f54b49df24d3c920c04dca3c1a43b Mon Sep 17 00:00:00 2001 From: neocotic Date: Mon, 4 Feb 2013 15:26:56 +0000 Subject: [PATCH 3/3] roll v2.0.2 --- CHANGES.md | 5 +++++ LICENSE.md | 2 +- dist/md.min.js | 6 +++--- docs/md.html | 6 +++--- lib/md.js | 6 +++--- package.json | 2 +- src/md.coffee | 6 +++--- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 1d13644..7432053 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ # Change Log +## 2013.02.04, Version 2.0.2 + +* [#13](https://github.com/neocotic/html.md/issues/13): Add new man page +* [#14](https://github.com/neocotic/html.md/issues/14): Fix bug with `eval` option + ## 2012.12.12, Version 2.0.1 * [#8](https://github.com/neocotic/html.md/issues/8): Fix incorrect version diff --git a/LICENSE.md b/LICENSE.md index 003baed..11676a9 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (C) 2012 Alasdair Mercer, http://neocotic.com/ +Copyright (C) 2013 Alasdair Mercer, http://neocotic.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/dist/md.min.js b/dist/md.min.js index fb7b20f..bacc4bb 100644 --- a/dist/md.min.js +++ b/dist/md.min.js @@ -1,9 +1,9 @@ -// [html.md](http://neocotic.com/html.md) 2.0.1 -// (c) 2012 Alasdair Mercer +// [html.md](http://neocotic.com/html.md) 2.0.2 +// (c) 2013 Alasdair Mercer // Freely distributable under the MIT license. // Based on [Make.text](http://homepage.mac.com/tjim/) 1.5 // (c) 2007 Trevor Jim // Licensed under the GPL Version 2 license. // For all details and documentation: // -(function(){var t,e,i,s,n,o,r,h,a,u,p,l,c,d,f,E,N,g,y,m,L={}.hasOwnProperty,T=this;t={absolute:!1,debug:!1},s=this.md,o={"\\\\":"\\\\","\\[":"\\[","\\]":"\\]",">":"\\>",_:"\\_","\\*":"\\*","`":"\\`","#":"\\#","([0-9])\\.(\\s|$)":"$1\\.$2","©":"(c)","®":"(r)","™":"(tm)"," ":" ","·":"\\*"," ":" "," ":" "," ":" ","‘":"'","’":"'","“":'"',"”":'"',"…":"...","–":"--","—":"---"},r=/(display|visibility)\s*:\s*[a-z]+/gi,h=/(none|hidden)\s*$/i,a=/^(APPLET|AREA|AUDIO|BUTTON|CANVAS|COMMAND|DATALIST|EMBED|HEAD|INPUT|KEYGEN|MAP|MENU|METER|NOFRAMES|NOSCRIPT|OBJECT|OPTGROUP|OPTION|PARAM|PROGRESS|RP|RT|RUBY|SCRIPT|SELECT|SOURCE|STYLE|TEXTAREA|TITLE|TRACK|VIDEO)$/,u=/^(ADDRESS|ARTICLE|ASIDE|DIV|FIELDSET|FOOTER|HEADER|NAV|P|SECTION)$/,n=function(){f={};for(c in o)L.call(o,c)&&(E=o[c],f[c]=RegExp(c,"g"));return f}(),N="undefined"!=typeof window&&null!==window?window:null,("undefined"==typeof window||null===window)&&(l=require("jsdom"),p=l.jsdom(null,null,{features:{FetchExternalResources:!1}}),N=p.createWindow()),i=null!=(g=N.Node)?g:{},null==(y=i.ELEMENT_NODE)&&(i.ELEMENT_NODE=1),null==(m=i.TEXT_NODE)&&(i.TEXT_NODE=3),e=function(){function e(e,i){var s;this.html=null!=e?e:"",this.options=null!=i?i:{},this.atLeft=this.atNoWS=this.atP=!0,this.buffer="",this.exceptions=[],this.inCode=this.inPre=this.inOrderedList=this.parsed=!1,this.last=null,this.left="\n",this.links=[],this.linkMap={},this.unhandled={},"object"!=typeof this.options&&(this.options={});for(c in t)L.call(t,c)&&(s=t[c],this.options.hasOwnProperty(c)||(this.options[c]=s))}return e.prototype.append=function(t){return null!=this.last&&(this.buffer+=this.last),this.last=t},e.prototype.attr=function(t,e,i){return null==i&&(i=!0),i?t[e]:"function"==typeof t.getAttribute?t.getAttribute(e):void 0},e.prototype.br=function(){return this.append(" "+this.left),this.atLeft=this.atNoWS=!0},e.prototype.code=function(){var t,e=this;return t=this.inCode,this.inCode=!0,function(){return e.inCode=t}},e.prototype.inCodeProcess=function(t){return t.replace(/`/g,"\\`")},e.prototype.isVisible=function(t){var e,i,s,n,o,a,u,p;if(n=this.attr(t,"style",!1),i=null!=n?n.match(r):void 0,a=!0,null!=i)for(u=0,p=i.length;p>u;u++)s=i[u],a=!h.test(s);if(a&&null!=N.getComputedStyle)try{n=N.getComputedStyle(t,null),"function"==typeof(null!=n?n.getPropertyValue:void 0)&&(e=n.getPropertyValue("display"),o=n.getPropertyValue("visibility"),a="none"!==e&&"hidden"!==o)}catch(l){this.thrown(l,"getComputedStyle")}return a},e.prototype.nonPreProcess=function(t){t=t.replace(/\n([ \t]*\n)+/g,"\n"),t=t.replace(/\n[ \t]+/g,"\n"),t=t.replace(/[ \t]+/g," ");for(c in o)L.call(o,c)&&(E=o[c],t=t.replace(n[c],E));return t},e.prototype.ol=function(){var t,e=this;return t=this.inOrderedList,this.inOrderedList=!0,function(){return e.inOrderedList=t}},e.prototype.output=function(t){return t&&(this.inPre||(t=this.atNoWS?t.replace(/^[ \t\n]+/,""):/^[ \t]*\n/.test(t)?t.replace(/^[ \t\n]+/,"\n"):t.replace(/^[ \t]+/," ")),""!==t)?(this.atP=/\n\n$/.test(t),this.atLeft=/\n$/.test(t),this.atNoWS=/[ \t\n]$/.test(t),this.append(t.replace(/\n/g,this.left))):void 0},e.prototype.outputLater=function(t){var e=this;return function(){return e.output(t)}},e.prototype.p=function(){return this.atP?void 0:(this.atLeft||(this.append(this.left),this.atLeft=!0),this.append(this.left),this.atNoWS=this.atP=!0)},e.prototype.parse=function(){var t,e,i,s,n,o,r,h;if(!this.html)return"";if(this.parsed)return this.buffer;if(t=N.document.createElement("div"),"string"==typeof this.html?t.innerHTML=this.html:t.appendChild(this.html),this.process(t),this.links.length)for(this.append("\n\n"),h=this.links,e=o=0,r=h.length;r>o;e=++o)i=h[e],i&&this.append("["+e+"]: "+i+"\n");return this.options.debug&&(n=function(){var t,e;t=this.unhandled,e=[];for(s in t)L.call(t,s)&&e.push(s);return e}.call(this).sort(),n.length?console.log("Ignored tags;\n"+n.join(", ")):console.log("No tags were ignored"),this.exceptions.length?console.log("Exceptions;\n"+this.exceptions.join("\n")):console.log("No exceptions were thrown")),this.append(""),this.parsed=!0,this.buffer=this.buffer.trim()},e.prototype.pre=function(){var t,e=this;return t=this.inPre,this.inPre=!0,function(){return e.inPre=t}},e.prototype.process=function(t){var e,s,n,o,r,h,p,l,c,d,f,E,N,g,y,m;if(this.isVisible(t)){if(t.nodeType===i.ELEMENT_NODE){c=!1;try{if(a.test(t.tagName))c=!0;else if(/^H[1-6]$/.test(t.tagName))l=parseInt(t.tagName.match(/([1-6])$/)[1]),this.p(),this.output(""+function(){var t,e;for(e=[],h=t=1;l>=1?l>=t:t>=l;h=l>=1?++t:--t)e.push("#");return e}().join("")+" ");else if(u.test(t.tagName))this.p();else switch(t.tagName){case"BODY":case"FORM":break;case"DETAILS":this.p(),this.attr(t,"open",!1)||(c=!0,f=t.getElementsByTagName("summary")[0],f&&this.process(f));break;case"BR":this.br();break;case"HR":this.p(),this.output("---"),this.p();break;case"CITE":case"DFN":case"EM":case"I":case"U":case"VAR":this.output("_"),this.atNoWS=!0,e=this.outputLater("_");break;case"DT":case"B":case"STRONG":"DT"===t.tagName&&this.p(),this.output("**"),this.atNoWS=!0,e=this.outputLater("**");break;case"Q":this.output('"'),this.atNoWS=!0,e=this.outputLater('"');break;case"OL":case"PRE":case"UL":s=this.pushLeft(" "),n=function(){switch(t.tagName){case"OL":return this.ol();case"PRE":return this.pre();case"UL":return this.ul()}}.call(this),e=function(){return s(),n()};break;case"LI":this.replaceLeft(this.inOrderedList?"1. ":"* ");break;case"CODE":case"KBD":case"SAMP":this.inPre||(this.output("`"),s=this.code(),n=this.outputLater("`"),e=function(){return s(),n()});break;case"BLOCKQUOTE":case"DD":e=this.pushLeft("> ");break;case"A":if(r=this.attr(t,"href",this.options.absolute),!r)break;E=this.attr(t,"title"),E&&(r+=' "'+E+'"'),null!=this.linkMap[r]?p=this.linkMap[r]:(p=this.links.push(r)-1,this.linkMap[r]=p),this.output("["),this.atNoWS=!0,e=this.outputLater("]["+p+"]");break;case"IMG":if(c=!0,d=this.attr(t,"src",this.options.absolute),!d)break;this.output("!["+this.attr(t,"alt")+"]("+d+")");break;case"FRAME":case"IFRAME":c=!0;try{(null!=(y=t.contentDocument)?y.documentElement:void 0)&&this.process(t.contentDocument.documentElement)}catch(L){this.thrown(L,"contentDocument")}break;case"TR":e=this.p;break;default:this.options.debug&&(this.unhandled[t.tagName]=null)}}catch(L){this.thrown(L,t.tagName)}if(!c)for(m=t.childNodes,N=0,g=m.length;g>N;N++)o=m[N],this.process(o);return null!=e?e.call(this):void 0}return t.nodeType===i.TEXT_NODE?this.inPre?this.output(t.nodeValue):this.inCode?this.output(this.inCodeProcess(t.nodeValue)):this.output(this.nonPreProcess(t.nodeValue)):void 0}},e.prototype.pushLeft=function(t){var e,i=this;return e=this.left,this.left+=t,this.atP?this.append(t):this.p(),function(){return i.left=e,i.atLeft=i.atP=!1,i.p()}},e.prototype.replaceLeft=function(t){return this.atLeft?this.last?this.last=this.last.replace(/[ ]{4}$/,t):void 0:(this.append(this.left.replace(/[ ]{4}$/,t)),this.atLeft=this.atNoWS=this.atP=!0)},e.prototype.thrown=function(t,e){return this.options.debug?this.exceptions.push(""+e+": "+t):void 0},e.prototype.ul=function(){var t,e=this;return t=this.inOrderedList,this.inOrderedList=!1,function(){return e.inOrderedList=t}},e}(),this.md=d=function(t,i){return new e(t,i).parse()},("undefined"!=typeof module&&null!==module?module.exports:void 0)?module.exports=d:"function"==typeof define&&define.amd&&define("md",function(){return d}),d.VERSION="2.0.1",d.noConflict=function(){return T.md=s,d}}).call(this); \ No newline at end of file +(function(){var t,e,i,s,n,o,r,h,a,u,p,l,c,d,f,E,N,g,y,m,L={}.hasOwnProperty,T=this;t={absolute:!1,debug:!1},s=this.md,o={"\\\\":"\\\\","\\[":"\\[","\\]":"\\]",">":"\\>",_:"\\_","\\*":"\\*","`":"\\`","#":"\\#","([0-9])\\.(\\s|$)":"$1\\.$2","©":"(c)","®":"(r)","™":"(tm)"," ":" ","·":"\\*"," ":" "," ":" "," ":" ","‘":"'","’":"'","“":'"',"”":'"',"…":"...","–":"--","—":"---"},r=/(display|visibility)\s*:\s*[a-z]+/gi,h=/(none|hidden)\s*$/i,a=/^(APPLET|AREA|AUDIO|BUTTON|CANVAS|COMMAND|DATALIST|EMBED|HEAD|INPUT|KEYGEN|MAP|MENU|METER|NOFRAMES|NOSCRIPT|OBJECT|OPTGROUP|OPTION|PARAM|PROGRESS|RP|RT|RUBY|SCRIPT|SELECT|SOURCE|STYLE|TEXTAREA|TITLE|TRACK|VIDEO)$/,u=/^(ADDRESS|ARTICLE|ASIDE|DIV|FIELDSET|FOOTER|HEADER|NAV|P|SECTION)$/,n=function(){f={};for(c in o)L.call(o,c)&&(E=o[c],f[c]=RegExp(c,"g"));return f}(),N="undefined"!=typeof window&&null!==window?window:null,("undefined"==typeof window||null===window)&&(l=require("jsdom"),p=l.jsdom(null,null,{features:{FetchExternalResources:!1}}),N=p.createWindow()),i=null!=(g=N.Node)?g:{},null==(y=i.ELEMENT_NODE)&&(i.ELEMENT_NODE=1),null==(m=i.TEXT_NODE)&&(i.TEXT_NODE=3),e=function(){function e(e,i){var s;this.html=null!=e?e:"",this.options=null!=i?i:{},this.atLeft=this.atNoWS=this.atP=!0,this.buffer="",this.exceptions=[],this.inCode=this.inPre=this.inOrderedList=this.parsed=!1,this.last=null,this.left="\n",this.links=[],this.linkMap={},this.unhandled={},"object"!=typeof this.options&&(this.options={});for(c in t)L.call(t,c)&&(s=t[c],this.options.hasOwnProperty(c)||(this.options[c]=s))}return e.prototype.append=function(t){return null!=this.last&&(this.buffer+=this.last),this.last=t},e.prototype.attr=function(t,e,i){return null==i&&(i=!0),i?t[e]:"function"==typeof t.getAttribute?t.getAttribute(e):void 0},e.prototype.br=function(){return this.append(" "+this.left),this.atLeft=this.atNoWS=!0},e.prototype.code=function(){var t,e=this;return t=this.inCode,this.inCode=!0,function(){return e.inCode=t}},e.prototype.inCodeProcess=function(t){return t.replace(/`/g,"\\`")},e.prototype.isVisible=function(t){var e,i,s,n,o,a,u,p;if(n=this.attr(t,"style",!1),i=null!=n?n.match(r):void 0,a=!0,null!=i)for(u=0,p=i.length;p>u;u++)s=i[u],a=!h.test(s);if(a&&null!=N.getComputedStyle)try{n=N.getComputedStyle(t,null),"function"==typeof(null!=n?n.getPropertyValue:void 0)&&(e=n.getPropertyValue("display"),o=n.getPropertyValue("visibility"),a="none"!==e&&"hidden"!==o)}catch(l){this.thrown(l,"getComputedStyle")}return a},e.prototype.nonPreProcess=function(t){t=t.replace(/\n([ \t]*\n)+/g,"\n"),t=t.replace(/\n[ \t]+/g,"\n"),t=t.replace(/[ \t]+/g," ");for(c in o)L.call(o,c)&&(E=o[c],t=t.replace(n[c],E));return t},e.prototype.ol=function(){var t,e=this;return t=this.inOrderedList,this.inOrderedList=!0,function(){return e.inOrderedList=t}},e.prototype.output=function(t){return t&&(this.inPre||(t=this.atNoWS?t.replace(/^[ \t\n]+/,""):/^[ \t]*\n/.test(t)?t.replace(/^[ \t\n]+/,"\n"):t.replace(/^[ \t]+/," ")),""!==t)?(this.atP=/\n\n$/.test(t),this.atLeft=/\n$/.test(t),this.atNoWS=/[ \t\n]$/.test(t),this.append(t.replace(/\n/g,this.left))):void 0},e.prototype.outputLater=function(t){var e=this;return function(){return e.output(t)}},e.prototype.p=function(){return this.atP?void 0:(this.atLeft||(this.append(this.left),this.atLeft=!0),this.append(this.left),this.atNoWS=this.atP=!0)},e.prototype.parse=function(){var t,e,i,s,n,o,r,h;if(!this.html)return"";if(this.parsed)return this.buffer;if(t=N.document.createElement("div"),"string"==typeof this.html?t.innerHTML=this.html:t.appendChild(this.html),this.process(t),this.links.length)for(this.append("\n\n"),h=this.links,e=o=0,r=h.length;r>o;e=++o)i=h[e],i&&this.append("["+e+"]: "+i+"\n");return this.options.debug&&(n=function(){var t,e;t=this.unhandled,e=[];for(s in t)L.call(t,s)&&e.push(s);return e}.call(this).sort(),n.length?console.log("Ignored tags;\n"+n.join(", ")):console.log("No tags were ignored"),this.exceptions.length?console.log("Exceptions;\n"+this.exceptions.join("\n")):console.log("No exceptions were thrown")),this.append(""),this.parsed=!0,this.buffer=this.buffer.trim()},e.prototype.pre=function(){var t,e=this;return t=this.inPre,this.inPre=!0,function(){return e.inPre=t}},e.prototype.process=function(t){var e,s,n,o,r,h,p,l,c,d,f,E,N,g,y,m;if(this.isVisible(t)){if(t.nodeType===i.ELEMENT_NODE){c=!1;try{if(a.test(t.tagName))c=!0;else if(/^H[1-6]$/.test(t.tagName))l=parseInt(t.tagName.match(/([1-6])$/)[1]),this.p(),this.output(""+function(){var t,e;for(e=[],h=t=1;l>=1?l>=t:t>=l;h=l>=1?++t:--t)e.push("#");return e}().join("")+" ");else if(u.test(t.tagName))this.p();else switch(t.tagName){case"BODY":case"FORM":break;case"DETAILS":this.p(),this.attr(t,"open",!1)||(c=!0,f=t.getElementsByTagName("summary")[0],f&&this.process(f));break;case"BR":this.br();break;case"HR":this.p(),this.output("---"),this.p();break;case"CITE":case"DFN":case"EM":case"I":case"U":case"VAR":this.output("_"),this.atNoWS=!0,e=this.outputLater("_");break;case"DT":case"B":case"STRONG":"DT"===t.tagName&&this.p(),this.output("**"),this.atNoWS=!0,e=this.outputLater("**");break;case"Q":this.output('"'),this.atNoWS=!0,e=this.outputLater('"');break;case"OL":case"PRE":case"UL":s=this.pushLeft(" "),n=function(){switch(t.tagName){case"OL":return this.ol();case"PRE":return this.pre();case"UL":return this.ul()}}.call(this),e=function(){return s(),n()};break;case"LI":this.replaceLeft(this.inOrderedList?"1. ":"* ");break;case"CODE":case"KBD":case"SAMP":this.inPre||(this.output("`"),s=this.code(),n=this.outputLater("`"),e=function(){return s(),n()});break;case"BLOCKQUOTE":case"DD":e=this.pushLeft("> ");break;case"A":if(r=this.attr(t,"href",this.options.absolute),!r)break;E=this.attr(t,"title"),E&&(r+=' "'+E+'"'),null!=this.linkMap[r]?p=this.linkMap[r]:(p=this.links.push(r)-1,this.linkMap[r]=p),this.output("["),this.atNoWS=!0,e=this.outputLater("]["+p+"]");break;case"IMG":if(c=!0,d=this.attr(t,"src",this.options.absolute),!d)break;this.output("!["+this.attr(t,"alt")+"]("+d+")");break;case"FRAME":case"IFRAME":c=!0;try{(null!=(y=t.contentDocument)?y.documentElement:void 0)&&this.process(t.contentDocument.documentElement)}catch(L){this.thrown(L,"contentDocument")}break;case"TR":e=this.p;break;default:this.options.debug&&(this.unhandled[t.tagName]=null)}}catch(L){this.thrown(L,t.tagName)}if(!c)for(m=t.childNodes,N=0,g=m.length;g>N;N++)o=m[N],this.process(o);return null!=e?e.call(this):void 0}return t.nodeType===i.TEXT_NODE?this.inPre?this.output(t.nodeValue):this.inCode?this.output(this.inCodeProcess(t.nodeValue)):this.output(this.nonPreProcess(t.nodeValue)):void 0}},e.prototype.pushLeft=function(t){var e,i=this;return e=this.left,this.left+=t,this.atP?this.append(t):this.p(),function(){return i.left=e,i.atLeft=i.atP=!1,i.p()}},e.prototype.replaceLeft=function(t){return this.atLeft?this.last?this.last=this.last.replace(/[ ]{4}$/,t):void 0:(this.append(this.left.replace(/[ ]{4}$/,t)),this.atLeft=this.atNoWS=this.atP=!0)},e.prototype.thrown=function(t,e){return this.options.debug?this.exceptions.push(""+e+": "+t):void 0},e.prototype.ul=function(){var t,e=this;return t=this.inOrderedList,this.inOrderedList=!1,function(){return e.inOrderedList=t}},e}(),this.md=d=function(t,i){return new e(t,i).parse()},("undefined"!=typeof module&&null!==module?module.exports:void 0)?module.exports=d:"function"==typeof define&&define.amd&&define("md",function(){return d}),d.VERSION="2.0.2",d.noConflict=function(){return T.md=s,d}}).call(this); \ No newline at end of file diff --git a/docs/md.html b/docs/md.html index 7b7cfc7..c2d7f6f 100644 --- a/docs/md.html +++ b/docs/md.html @@ -1,5 +1,5 @@ - md.coffee

md.coffee

html.md 2.0.1
-(c) 2012 Alasdair Mercer
+ md.coffee

md.coffee

html.md 2.0.2
+(c) 2013 Alasdair Mercer
Freely distributable under the MIT license.
Based on Make.text 1.5
(c) 2007 Trevor Jim
@@ -311,7 +311,7 @@ new HtmlParser(html, options).parse()

Export md for NodeJS and CommonJS.

if module?.exports
   module.exports = md
 else if typeof define is 'function' and define.amd
-  define 'md', -> md

Public constants

Current version of html.md.

md.VERSION = '2.0.1'

Public functions

Run html.md in noConflict mode, returning the md variable to its + define 'md', -> md

Public constants

Current version of html.md.

md.VERSION = '2.0.2'

Public functions

Run html.md in noConflict mode, returning the md variable to its previous owner.
Returns a reference to md.

md.noConflict = =>
   @md = PREVIOUS_MD
diff --git a/lib/md.js b/lib/md.js
index b9899d7..400a353 100644
--- a/lib/md.js
+++ b/lib/md.js
@@ -1,5 +1,5 @@
-// [html.md](http://neocotic.com/html.md) 2.0.1
-// (c) 2012 Alasdair Mercer
+// [html.md](http://neocotic.com/html.md) 2.0.2
+// (c) 2013 Alasdair Mercer
 // Freely distributable under the MIT license.
 // Based on [Make.text](http://homepage.mac.com/tjim/) 1.5
 // (c) 2007 Trevor Jim
@@ -537,7 +537,7 @@
     });
   }
 
-  md.VERSION = '2.0.1';
+  md.VERSION = '2.0.2';
 
   md.noConflict = function() {
     _this.md = PREVIOUS_MD;
diff --git a/package.json b/package.json
index 81656b7..8736b88 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
     "name": "html-md"
   , "description": "JavaScript library for converting HTML in to valid Markdown"
-  , "version": "2.0.1"
+  , "version": "2.0.2"
   , "homepage": "http://neocotic.com/html.md"
   , "bugs": {
       "url": "https://github.com/neocotic/html.md/issues"
diff --git a/src/md.coffee b/src/md.coffee
index fa06c67..986700e 100644
--- a/src/md.coffee
+++ b/src/md.coffee
@@ -1,5 +1,5 @@
-# [html.md](http://neocotic.com/html.md) 2.0.1  
-# (c) 2012 Alasdair Mercer  
+# [html.md](http://neocotic.com/html.md) 2.0.2  
+# (c) 2013 Alasdair Mercer  
 # Freely distributable under the MIT license.  
 # Based on [Make.text](http://homepage.mac.com/tjim/) 1.5  
 # (c) 2007 Trevor Jim  
@@ -418,7 +418,7 @@ else if typeof define is 'function' and define.amd
 # ----------------
 
 # Current version of html.md.
-md.VERSION = '2.0.1'
+md.VERSION = '2.0.2'
 
 # Public functions
 # ----------------