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

isso: html.py: Make <code class="language-$lang"> for syntax highlighting #998

Merged

Conversation

pkvach
Copy link
Contributor

@pkvach pkvach commented Mar 12, 2024

Checklist

  • All new and existing tests are passing
  • I have added an entry to CHANGES.rst because this is a user-facing change or an important bugfix
  • I have written proper commit message(s)

What changes does this Pull Request introduce?

In html.py:

  • Updated the HTML sanitization process to allow specific attributes for different tags.

  • Modified the blockcode function to add 'language-' prefix to the class attribute for code tags, improving compatibility with Highlight.js.

Why is this necessary?

Closes #177

pkvach added 2 commits March 13, 2024 00:56
…ting

- Updated the HTML sanitization process to allow specific attributes for different tags.

- Modified the blockcode function to add 'language-' prefix to the class attribute for code tags, improving compatibility with Highlight.js.

Closes isso-comments#177
@jelmer jelmer merged commit f48a820 into isso-comments:master Mar 14, 2024
11 checks passed
@pkvach pkvach deleted the feat/code-block-syntax-highlighting branch March 14, 2024 18:10
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.

use <code class="language-$lang"> as per HTML5 standard
2 participants