A discussion is taking place around recognizing logs as code. tophee initially asks if a feature can identify logs as code, and lionel-rowe responds that it will recognize logs as code if they contain patterns that flag a post as containing code. Logs are detected if they “look like” code, and lionel-rowe suggests that detecting ISO8601 datetime representations can be effective. However, logs formatted with quote blocks (>) instead of code fences may not receive special treatment, as quoted blocks are not a correct way to format code. tophee disagrees, arguing that quoted blocks should not be ignored, as people often use them to format code despite it being incorrect.
It will recognize logs as code if they happen to “look like” code (i.e. contain any of the patterns that would flag a post as containing code). You can test it out on your content at the demo link.
There are lots of ways to format a datetime, and not all log formats start each line with a datetime in any case. I guess detecting full ISO8601 representations (1970-01-01T00:00:00+00:00 etc.) would work, as these are very unlikely to appear outside of code or logs.
Anything in code blocks (fenced or indented) is ignored. Quoted blocks don’t receive any special treatment. Quoted blocks aren’t a correct way to format code, and may lead to unexpected results.