@Joel-Murphy
yes, you're right, the source code contains javascript in order to make highlighter render snippet correctly.
And I just add a filter to convert markdown to HTML, then use jquery.text() to get the plan text.
And index the plan text into search finally.