use $closestMarkerIndex

this commit fix the regression bug introduced by 59907ff7578370dd554fe30e2de508dc696c29a9 commit

example
~~~
**strong** **strong** **strong** **strong** **strong** **strong** **strong** **strong** .....
**strong** **strong** **strong** **strong** **strong** **strong** ....
~~~
in this case `$closestMarker;` ("`*`" mark) is appended again and again and it make slowdown