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

remove unnecessary HTML tags if linenumbering is not requred #20

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

remove unnecessary HTML tags if linenumbering is not requred #20

wants to merge 1 commit into from

Conversation

gottschali
Copy link

Description

Remove unnecessarily HTML table tags when line numbers are disabled

Strips

from the beginning and the corresponding
closing tags at the end from the highlighted code. The table is used for
line numbering but when this is disabled it has no use.
Futhermore it changes the wrapping to a

because the centering of the code broke otherwise. To make that possible process_html is now passed a new parameter linenos and executed before the addition of the centering tags to facilitate the stripping.

Resolves: #15

Checklist:

Please replace the space inside the brackets with an x and fill out the ellipses if the following items apply:

  • I've read and understood the contribution guidelines
  • I've tested my changes against at least one of the following Anki builds:
    • Latest standard Anki 2.1 binary build [required for Anki-compatible 2.1 add-ons]
    • Latest alternative Anki 2.1 binary build
    • Latest Anki 2.0 binary build [required for Anki 2.0-compatible add-ons]
  • I've tested my changes on at least one of the following platforms:
    • Linux, version: Arch 5.5.13
    • Windows, version:
    • macOS, version:
  • My changes potentially affect non-desktop platforms, of which I've tested:
    • AnkiMobile, version:
    • AnkiDroid, version:
    • AnkiWeb

@gottschali
Copy link
Author

Could someone check this on windows please?
Also I'm not sure if I did the squashing and merging right, it's the first time I do that.

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.

Code unnecessarily wrapped in <table> when line numbers are disabled
1 participant