Skip to content

Conversation

@kkthxbye-code
Copy link
Contributor

@kkthxbye-code kkthxbye-code commented Jul 23, 2023

Fixes: #13051

See reasoning for CSS changes here: #13051 (comment)

@jeremystretch
Copy link
Member

@kkthxbye-code in what I can only assume is a pure coincidence and not a personal slight against you, Markdown 1.5 was just released yesterday and removes the blocker on Markdown 3.4. Should we move forward with upgrading Markdown now instead?

@kkthxbye-code
Copy link
Contributor Author

Tried it out briefly. It installs fine, haven't checked for differences in mkdocs though, but it builds. However I wanted the upgrade because the TableExtension would use the style attribute instead, which makes the css changes unnecessary, however with bleach it's not enough to allow the style attribute:

https://bleach.readthedocs.io/en/latest/clean.html#sanitizing-css

You have to install the additional package bleach[css] and pass a CSSSanitizer to the sanitizer. I can do the work, but there's a bunch of other changes to mkdocs that we need to verify doesn't break the docs. On top of that, bleach is deprecated (still going to get security patches I think).

Not sure what the best option is here. However if we keep the current fix, we need to remember that when we upgrade python-markdown to 3.4.x, we need to pass the use_align_attribute=True to TableExtension - otherwise tables will break because they made the new way of doing it the default.

Simple stuff is never simple...

@jeremystretch
Copy link
Member

In that case, I have no problem merging this as-is. Thanks for digging so far into this!

@jeremystretch jeremystretch merged commit 4b29223 into netbox-community:develop Jul 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to Align Markdown Tables Values

2 participants