Skip to content

Commit d0d8ab0

Browse files
authored
Merge pull request #72 from jordantrizz/check-markers
Check if README.md has actual markers
2 parents 6ca5217 + 852d427 commit d0d8ab0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gh-md-toc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ gh_toc(){
143143
local toc=`echo "$rawhtml" | gh_toc_grab "$gh_src_copy"`
144144
echo "$toc"
145145
if [ "$need_replace" = "yes" ]; then
146+
if grep -Fxq "<!--ts-->" $gh_src && grep -Fxq "<!--te-->" $gh_src; then
147+
echo "Found markers"
148+
else
149+
echo "You don't have <!--ts--> or <!--te--> in your file...exiting"
150+
exit 1
151+
fi
146152
local ts="<\!--ts-->"
147153
local te="<\!--te-->"
148154
local dt=`date +'%F_%H%M%S'`

0 commit comments

Comments
 (0)