mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Merge branch 'develop' into feature/source_indentation_auto_removal
This commit is contained in:
commit
8591ec8196
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,3 +1,13 @@
|
|||
<a name="1.4.1"></a>
|
||||
## [1.4.1](https://github.com/showdownjs/showdown/compare/1.4.0...v1.4.1) (2016-05-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **tables:** fix table heading separators requiring 3 dashes instead of 2 ([ddaacfc](https://github.com/showdownjs/showdown/commit/ddaacfc)), closes [#256](https://github.com/showdownjs/showdown/issues/256)
|
||||
|
||||
|
||||
|
||||
<a name="1.4.0"></a>
|
||||
# [1.4.0](https://github.com/showdownjs/showdown/compare/1.3.0...v1.4.0) (2016-05-13)
|
||||
|
||||
|
|
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "showdown",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"description": "A Markdown to HTML converter written in Javascript",
|
||||
"author": "Estevão Santos",
|
||||
"homepage": "http://showdownjs.github.io/showdown/",
|
||||
|
|
|
@ -40,6 +40,10 @@ showdown.subParser('codeSpans', function (text, options, globals) {
|
|||
(?!`)
|
||||
/gm, function(){...});
|
||||
*/
|
||||
|
||||
if (typeof(text) === 'undefined') {
|
||||
text = '';
|
||||
}
|
||||
text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
|
||||
function (wholeMatch, m1, m2, m3) {
|
||||
var c = m3;
|
||||
|
|
|
@ -7,7 +7,7 @@ showdown.subParser('images', function (text, options, globals) {
|
|||
text = globals.converter._dispatch('images.before', text, options, globals);
|
||||
|
||||
var inlineRegExp = /!\[(.*?)]\s?\([ \t]*()<?(\S+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(['"])(.*?)\6[ \t]*)?\)/g,
|
||||
referenceRegExp = /!\[(.*?)][ ]?(?:\n[ ]*)?\[(.*?)]()()()()()/g;
|
||||
referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[(.*?)]()()()()()/g;
|
||||
|
||||
function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) {
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@ showdown.subParser('tables', function (text, options, globals) {
|
|||
return text;
|
||||
}
|
||||
|
||||
var tableRgx = /^[ \t]{0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){3,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){3,}[^]+?(?:\n\n|~0)/gm;
|
||||
var tableRgx = /^[ \t]{0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){2,}[^]+?(?:\n\n|~0)/gm;
|
||||
|
||||
function parseStyles(sLine) {
|
||||
if (/^:[ \t]*---*$/.test(sLine)) {
|
||||
if (/^:[ \t]*--*$/.test(sLine)) {
|
||||
return ' style="text-align:left;"';
|
||||
} else if (/^---*[ \t]*:[ \t]*$/.test(sLine)) {
|
||||
} else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) {
|
||||
return ' style="text-align:right;"';
|
||||
} else if (/^:[ \t]*---*[ \t]*:$/.test(sLine)) {
|
||||
} else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) {
|
||||
return ' style="text-align:center;"';
|
||||
} else {
|
||||
return '';
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>key</th>
|
||||
<th>value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>My Key</td>
|
||||
<td>My Value</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -0,0 +1,3 @@
|
|||
|key|value|
|
||||
|--|--|
|
||||
|My Key|My Value|
|
48
test/features/tables/table-without-leading-pipe.html
Normal file
48
test/features/tables/table-without-leading-pipe.html
Normal file
|
@ -0,0 +1,48 @@
|
|||
|
||||
<h3 id="stats">Stats</h3>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>AGENT1</th>
|
||||
<th>AGENT2</th>
|
||||
<th>AGENT3</th>
|
||||
<th>AGENT4</th>
|
||||
<th>AGENT5</th>
|
||||
<th>AGENT6</th>
|
||||
<th>AGENT7</th>
|
||||
<th>AGENT8</th>
|
||||
<th>AGENT9</th>
|
||||
<th>TOTAL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>AGENT ERROR</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>APPROVED</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
8
test/features/tables/table-without-leading-pipe.md
Normal file
8
test/features/tables/table-without-leading-pipe.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
### Stats
|
||||
|
||||
|
||||
Status | AGENT1 | AGENT2 | AGENT3 | AGENT4 | AGENT5 | AGENT6 | AGENT7 | AGENT8 | AGENT9 | TOTAL |
|
||||
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
AGENT ERROR | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
|
||||
APPROVED | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
|
17
test/issues/#261.mix-images-with-links.html
Normal file
17
test/issues/#261.mix-images-with-links.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<p><img src="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png" alt="sd-inline" /> <a href="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">sd-ref</a></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><a href="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png">sd-inline</a> <img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /> <a href="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png">sd-inline</a></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><a href="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">sd-ref</a> <img src="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png" alt="sd-inline" /></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><a href="http://www.google.com/"><img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /></a></p>
|
19
test/issues/#261.mix-images-with-links.md
Normal file
19
test/issues/#261.mix-images-with-links.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo]
|
||||
|
||||
foo
|
||||
|
||||
[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo]
|
||||
|
||||
foo
|
||||
|
||||
![sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png)
|
||||
|
||||
foo
|
||||
|
||||
[sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png)
|
||||
|
||||
foo
|
||||
|
||||
[![sd-ref][sd-logo]](http://www.google.com/)
|
||||
|
||||
[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png
|
|
@ -0,0 +1,5 @@
|
|||
<p><img src="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png" alt="sd-inline" /> <img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /> <img src="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png" alt="sd-inline" /></p>
|
|
@ -0,0 +1,7 @@
|
|||
![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo]
|
||||
|
||||
foo
|
||||
|
||||
![sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png)
|
||||
|
||||
[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png
|
|
@ -0,0 +1,5 @@
|
|||
<p><a href="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png">sd-inline</a> <a href="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">sd-ref</a></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><a href="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">sd-ref</a> <a href="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png">sd-inline</a></p>
|
|
@ -0,0 +1,7 @@
|
|||
[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo]
|
||||
|
||||
foo
|
||||
|
||||
[sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png)
|
||||
|
||||
[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png
|
Loading…
Reference in New Issue
Block a user