mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
added check for undefined on text due to failing to parse tables
This commit is contained in:
parent
94ec12b12d
commit
6e30a48890
|
@ -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;
|
||||
|
|
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 |
|
Loading…
Reference in New Issue
Block a user