Automatic highlighting fails for some fenced code blocks

The code is not highlighted because of a condition that skips auto-detection for any code longer than 1k characters.

This PR changes the logic to use a bounded 2k prefix to detect the language.

3 Likes