pymarkdown
pymarkdown copied to clipboard
MD013 incompatible with tables.
There is no existing options to disable MD013 (line length) on tables. This is an option in the project markdownlint and the docs on this rule claims that inspiration was taken from Markdownlint.
Other solution to this issue would be to enable multiline pragmas, but that is unavailable either.
As a result, the linter always reports MD013 violation on tables longer than the globally set value. Reformatting the table is not an option, because newlines create new table rows instead.
Hey, I'd like to bump this issue up. We're happy to work on this and open a pull request, given some guidance.
It is somewhat buried, hence the issue to fix documentation...
use a pragma of disable-num-lines 3 md013
instead of disable-next-line md013
before the table, and it should suppress the error. This was just added in the 0.9.14 release.
Any comments back on whether that worked for both cases?
The next minor release is all bug fixes, and the one after that is adding new features. Primarily extensions and rule fixes. One of those is tables, but it may be pushed out another release as it is adding a leaf token which requires tons more testing.
Hello, thanks for the answer. We are looking forward to being able to use the new features as we consider problematic having the table lengths hardcoded. Your solution would most certainly work right now, but it simply is harder to maintain. If you expect to introduce the table support in the future, we will most certainly want to use that option even if it requires a little bit of patience.
Thank you for your support!
Just to confirm, using:
<!-- pyml disable-num-lines 7 md013 -->
... does allow "wide" tables to pass linting.
However, I agree with @BorekZnovustvoritel that this is particularly clunky. It would be great to be able to use a setting like:
plugins.line-length.tables = false
... if possible 🙏🏻