Skip to content

Commit

Permalink
Merge pull request ekalinin#72 from jordantrizz/check-markers
Browse files Browse the repository at this point in the history
Check if README.md has actual markers
  • Loading branch information
ekalinin authored May 14, 2019
2 parents 6ca5217 + 852d427 commit d0d8ab0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gh-md-toc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ gh_toc(){
local toc=`echo "$rawhtml" | gh_toc_grab "$gh_src_copy"`
echo "$toc"
if [ "$need_replace" = "yes" ]; then
if grep -Fxq "<!--ts-->" $gh_src && grep -Fxq "<!--te-->" $gh_src; then
echo "Found markers"
else
echo "You don't have <!--ts--> or <!--te--> in your file...exiting"
exit 1
fi
local ts="<\!--ts-->"
local te="<\!--te-->"
local dt=`date +'%F_%H%M%S'`
Expand Down

0 comments on commit d0d8ab0

Please sign in to comment.