-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Automatic post summary causes weird line numbers in code-block #1369
Comments
For ease recreating this bug, I've put up a quick post as gist which explains and demonstrates the problem:
|
Hi Elmer. Were you able to resolve the problem you reported? If not, what version of Pelican are you using? If you're not using Pelican 3.4, which we just released two days ago, please upgrade and let us know if your problem persists. |
Hi Justin, I solved it by working around it, using a plugin so set explicit markers for the summary. However, I'll try again with Pelican 3.4, see what happens without the use of any plugins. |
This is still present in 3.4. In my case only the line numbers are shown (but that is irrelevant). But this behaviour is logical, because all line numbers are "physically" above the first line of code in the generated html. To fix this we would have to add a special case for tables in the I assume that this bug can also be reproduced with a normal table: Code tables are special tables with only one row and 2 cells + important line breaks.
But I think we should ask us a important question: Do we want tables in the summary? |
Is this still present in 3.6? |
Yes, https://bernhard.scheirle.de/page/2/ ("Tipue Search - Tag support" article) |
@Scheirle: I agree that tables are probably not appropriate for summary content. What do you propose we do about that? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your participation and understanding. |
When leaving Pelican to create post summaries automatically based on the
SUMMARY_MAX_LENGTH
setting, there is a bad interaction with code-blocks with:linenos: table
set:The amount of code shown depends entirely on the summary max length setting, but the line-numbers table will be as long as the actual code-block in source. This means that for the given article, the code-block ends after three lines, but the line-numbers count up to fitteen.
There are a couple of solutions to this, and perhaps multiple apply:
linenos
to beinline
, which removes the problem though copy/paste of code becomes tricky:summary:
would cause a lot of duplication for my use-case where I want the first bit of the article in the index)The text was updated successfully, but these errors were encountered: