818
Du
dustymarkdown / files
dustymarkdown / node_modules / node-markdown / lib / vendor / showdown / readme.txt
4.6 KB
1 2Showdown -- A JavaScript port of Markdown 3========================================= 4 5Showdown Copyright (c) 2007 John Fraser. 6<http://www.attacklab.net/> 7 8Original Markdown Copyright (c) 2004-2005 John Gruber 9<http://daringfireball.net/projects/markdown/> 10 11Redistributable under a BSD-style open source license. 12See license.txt for more information. 13 14 15What's it for? 16-------------- 17 18Developers can use Showdown to: 19 20 * Add in-browser preview to existing Markdown apps 21 22 Showdown's output is (almost always) identical to 23 markdown.pl's, so the server can reproduce exactly 24 the output that the user saw. (See below for 25 exceptions.) 26 27 * Add Markdown input to programs that don't support it 28 29 Any app that accepts HTML input can now be made to speak 30 Markdown by modifying the input pages's HTML. If your 31 application lets users edit documents again later, 32 then they won't have access to the original Markdown 33 text. But this should be good enough for many 34 uses -- and you can do it with just a two-line 35 `onsubmit` function! 36 37 * Add Markdown input to closed-source web apps 38 39 You can write bookmarklets or userscripts to extend 40 any standard textarea on the web so that it accepts 41 Markdown instead of HTML. With a little more hacking, 42 the same can probably be done with many rich edit 43 controls. 44 45 * Build new web apps from scratch 46 47 A Showdown front-end can send back text in Markdown, 48 HTML or both, so you can trade bandwidth for server 49 load to reduce your cost of operation. If your app 50 requires JavaScript, you won't need to do any 51 Markdown processing on the server at all. (For most 52 uses, you'll still need to sanitize the HTML before 53 showing it to other users -- but you'd need to do 54 that anyway if you're allowing raw HTML in your 55 Markdown.) 56 57 58Browser Compatibility 59--------------------- 60 61Showdown has been tested successfully with: 62 63 - Firefox 1.5 and 2.0 64 - Internet Explorer 6 and 7 65 - Safari 2.0.4 66 - Opera 8.54 and 9.10 67 - Netscape 8.1.2 68 - Konqueror 3.5.4 69 70In theory, Showdown will work in any browser that supports ECMA 262 3rd Edition (JavaScript 1.5). The converter itself might even work in things that aren't web browsers, like Acrobat. No promises. 71 72 73Known Differences in Output 74--------------------------- 75 76In most cases, Showdown's output is identical to that of Perl Markdown v1.0.2b7. What follows is a list of all known deviations. Please email me if you find more. 77 78 79 * This release uses the HTML parser from Markdown 1.0.2b2, 80 which means it fails `Inline HTML (Advanced).text` from 81 the Markdown test suite: 82 83 <div> 84 <div> 85 unindented == broken 86 </div> 87 </div> 88 89 90 * Showdown doesn't support the markdown="1" attribute: 91 92 <div markdown="1"> 93 Markdown does *not* work in here. 94 </div> 95 96 This is half laziness on my part and half stubbornness. 97 Markdown is smart enough to process the contents of span- 98 level tags without screwing things up; shouldn't it be 99 able to do the same inside block elements? Let's find a 100 way to make markdown="1" the default. 101 102 103 * You can only nest square brackets in link titles to a 104 depth of two levels: 105 106 [[fine]](http://www.attacklab.net/) 107 [[[broken]]](http://www.attacklab.net/) 108 109 If you need more, you can escape them with backslashes. 110 111 112 * When sublists have paragraphs, Showdown produces equivalent 113 HTML with a slightly different arrangement of newlines: 114 115 + item 116 117 - subitem 118 119 The HTML has a superfluous newline before this 120 paragraph. 121 122 - subitem 123 124 The HTML here is unchanged. 125 126 - subitem 127 128 The HTML is missing a newline after this 129 list subitem. 130 131 132 133 * Markdown.pl creates empty title attributes for 134 inline-style images: 135 136 Here's an empty title on an inline-style 137 . 138 139 I tried to replicate this to clean up my diffs during 140 testing, but I went too far: now Showdown also makes 141 empty titles for reference-style images: 142 143 Showdown makes an empty title for 144 reference-style ![images][] too. 145 146 [images]: http://w3.org/Icons/valid-xhtml10 147 148 149 * With crazy input, Markdown will mistakenly put 150 `<strong>` or `<em>` tags in URLs: 151 152 <a href="<*Markdown adds em tags in here*>"> 153 improbable URL 154 </a> 155 156 Showdown won't. But still, don't do that.