Skip to content

Commit 5aec2e8

Browse files
committed
Fix issue in 'cm build-readme' where it can't handle templates starting with @
1 parent 96ab6aa commit 5aec2e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/build-readme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ exports.buildReadme = function(pkg) {
3737
}
3838
template += "\n$$$"
3939
} else {
40-
let placeholders = /\n@[^]*@\w+|\n@\w+/.exec(template)
40+
let placeholders = /(^|\n)@[^]*@\w+|\n@\w+/.exec(template)
4141
html = build({
4242
mainText: placeholders[0],
4343
name: pkg.name,

0 commit comments

Comments
 (0)