Superfences style code triggering MD046
See original GitHub issueI’ve got some documentation code I’m working on automated testing for which belongs to the CiviCRM project.
We use MkDocs to build the content on our documentation site. As part of our automated testing we’d love to properly lint our documentation according to a style guide.
The issue we’re facing is that the MkDocs Material theme we’re using provides for a helpful admonitions feature and the superfences feature. With these tools we can nest code examples inside handy “highlight” boxes.
Unfortunately it appears that markdownlint is detecting these as indented code blocks and is therefore expecting all other code blocks to be the indented type rather than “fenced”.
We’d love to resolve this without turning off the check for inconsistency as this is useful for us.
Example code:
!!! note "How much does performance improve with a specialized cache service?"
The exact answer will depend on the use-case and environment. However, we can consider an example.
This example relates to CiviCRM `5.6.alpha1` on a barebones, local Drupal 7 site and benchmarked the time it takes to render the "Event Info" page (`/civicrm/event/info?id=1`) with the [Apache "ab"](https://en.wikipedia.org/wiki/ApacheBench) command. This sends a large number of HTTP requests and calculates the average response time.
``` bash
$ ab -n 100 -c 3 'http://localhost/civicrm/event/info?id=1'
```
With the default, pure-MySQL configuration, the mean response time was ~460ms. With Redis, this decreased by ~60ms (~13%) to ~400ms.
Note, though, the local copy of MySQL on this laptop is probably faster than a typical MySQL because it stores *everything* in ram-disk (rather than HDD or SSD). Compared to a typical, self-hosted MySQL, the Redis/Memcache advantage is probably wider.
Is there any chance at all that markdownlint would add support for the superfences style syntax?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
I’ll do some more thorough testing tomorrow and give you some repro steps and a repo pointer.
I’ll post the above to the issue queue for DavidAnson/vscode-markdownlint.
Good to close this one I think?