Skip to content

Commit

Permalink
fix) #8 正文内的类似0.2.5的版本号出会被替换
Browse files Browse the repository at this point in the history
  • Loading branch information
hexinyu committed Nov 5, 2019
1 parent 968c518 commit 92e0954
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MarkdownIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export class MarkdownIndex {
if (markIndex == -1) {
markIndex = 0;
}
line = line.replace(/\s*((\d+\.)+)\s*/g, "");
var re = new RegExp('(^\\s*\\' + this._indexBase + '+)\\s*((\\d+\\.)+)\\s+', "g");
line = line.replace(re, "$1");
return line.substr(0, markIndex + markCount)
+ " "
+ prefix
Expand Down

0 comments on commit 92e0954

Please sign in to comment.