matcornic / matcornic/hugo-theme-learn

New lines added after Python comments

Open
#385 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
1.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Is there anyone experiencing the issue that a new line is added after every Python comment? It is just for Python specifically, not other languages. I tried updating the highlight.js to the newest version but it didn't solve the issue.

Markdown:

```py
a_set = {1, 2, 3, 4, 5, 5}
a_set.add(99)
a_set.add(3)

# print {1, 2, 3, 4, 5, 99}
print(a_set)
```

Display:

display

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided Markdown Python code block and compare its rendered output with code in another language. Review the theme's syntax-highlighting integration, including the reported highlight.js version, and identify why a blank line appears after Python comments. Done means Python comments render without an added newline while other language highlighting remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.