Markdown was indeed not thread-safe, and I encountered a race issue here. Local variable should be fine if its lightweight, I had assumed there was a reason for the staticness.