Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Project: mkdocs-tablestrip #249

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SaltyAimbOtter
Copy link

What kind of change does this PR introduce?

  • Add a project
  • Update a project
  • Remove a project
  • Add or update a category
  • Change configuration
  • Documentation
  • Other, please describe:

Description:

I added the project mkdocs-tablestrip that strips certain table rows from the generated HTML.

Checklist:

  • X ] I have read the CONTRIBUTING guidelines.
  • I have not modified the README.md file. Projects are only supposed to be added or updated within the projects.yaml file since the README.md file is automatically generated.

@pawamoy
Copy link
Collaborator

pawamoy commented Aug 18, 2024

See #248 (comment) for why CI is failing.

@pawamoy
Copy link
Collaborator

pawamoy commented Aug 18, 2024

Quick comments on the plugin:

  • I noticed it uses BeautifulSoup to parse the HTML, modify it, and re-dump it. This is highly inefficient in a MkDocs setup (not blaming anyone, it's just how it is). The efficient way of doing this is with a Markdown extension that operates on the HTML (converted from Markdown) directly, to avoid re-parsing and re-dumping by each plugin. It would use a TreeProcessor (I'll let you look at their docs if you're interested in the switch). Note that a Markdown extension would only work on hard-coded tables, or tables generated by other Markdown extensions, but not table generated by other MkDocs plugins, so the switch might not be possible depending on your use-case.
  • Your README mentions removing rows of tables, but after reading the code, to me it looks like it removes columns corresponding to the keyword you specify, not rows: it removes the corresponding cell from the table headers, and the cells at the same index from all rows. So it effectively removes the column (vertical). Or did I misunderstand ☺️?

@pawamoy
Copy link
Collaborator

pawamoy commented Oct 10, 2024

@SaltyAimbOtter still interested in these PRs? 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants