8000 fix start · segmentfault/HyperDown.js@eb9cb21 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb9cb21

Browse files
committed
fix start
1 parent 72cd7b3 commit eb9cb21

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Parser.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"license": "BSD-4-Clause",
99
"author": "SegmentFault",
10-
"version": "2.4.28",
10+
"version": "2.4.29",
1111
"scripts": {
1212
"test": "mocha",
1313
"build": "cake build"

src/Parser.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,9 @@ class Parser
850850
for line, key in lines
851851
if matches = line.match new RegExp "^(\\s{#{space}})((?:[0-9]+\\.?)|\\-|\\+|\\*)(\\s+)(.*)$"
852852
if type is 'ol' and key is 0
853-
start = parseInt matches[2]
853+
olStart = parseInt matches[2]
854854

855-
suffix = ' start="' + start + '"' if start != 1
855+
suffix = ' start="' + olStart + '"' if olStart != 1
856856

857857
rows.push [matches[4]]
858858
last = rows.length - 1

0 commit comments

Comments
 (0)
0