-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Code unnecessarily wrapped in <table> when line numbers are disabled #15
Comments
I'd like this as well. I manually edited the code on my local install to remove the tables but it would be nice to have it in the official package also. |
FYI, I added a $15 bounty on this: https://www.bountysource.com/issues/86739059-code-unnecessarily-wrapped-in-table-when-line-numbers-are-disabled |
Thanks for the suggestion! This sounds reasonable. Can't think of any good reason to keep the tables when no line numbers are required (though I might be missing something). @Aliuakbar: Am I interpreting this right that you started working on this in your fork? Are you planning on submitting a PR? If so I will hold off on this and give you the floor of course. |
@glutanimate yes I was working on this on my fork. Removing the tag was relatively easy but I stumbled upon a problem that the centering broke. You don't have to hold on this issue and may also use my code if it is any help. |
In my fork I kept the table tag. I made the following note:
If I remember correctly it's useful to wrap the output of pygments in some tag so that you can set the style of the code block to left-aligned so that you can override General caveat also applies here: My coding skills are limited etc. |
For anyone else: I talked with @glutanimate, turns out this was already fixed a long time back and a new version of the addon just has not been released since. A fix is to build the addon at current master. Leaving issue open, so that it serves as a reminder for @glutanimate to release a new version at some point :) |
Problem description
This is how the HTML from Syntax Highlighting addon looks:
The
<table><tbody><tr><td>
tags seem to me to be unnecessary. As far as I understand, they are there to support line numbers, but since I don't have line numbers enabled, I don't think they serve any purpose. (With my CSS, they just take up extra whitespace.)I've set up syntax highlighting without line numbers, and style it with my own CSS.
Checklist
Please replace the space inside the brackets with an x if the following items apply:
Information about your Anki set-up
Please fill out the section corresponding with your Anki version:
I don't have "copy debug info" in my Anki, it's probably an older version:
Please open Anki, go to Tools → Add-ons, take a screenshot of your installed add-ons, and paste it below:
Error message (if any)
None
The text was updated successfully, but these errors were encountered: