Refactor code block detection in markdown parser
Replaces isInsideIncompleteCodeBlock with getOpenCodeFenceIndex for improved detection of open fenced code blocks. Updates all relevant handlers to use the new function, enhancing accuracy and maintainability when processing incomplete markdown inside code blocks.