make regex pattern non-greedy

The connect ".*~~" regex pattern matches other markup that uses "~~" such "~~NOTOC~~".
Merge pull request #1 from ssahara/greediness-fix

make regex pattern non-greedy