Skip to content

Conversation

@kpym
Copy link

@kpym kpym commented May 1, 2025

This pull request introduces a new configuration option, CodeClassPrefix, for the HTML renderer. The CodeClassPrefix allows users to set a custom prefix for the class attribute of <code> elements or remove the prefix entirely by setting it to an empty string.

Key Changes:

  • Added CodeClassPrefix to the HTML renderer configuration.
  • Introduced the html.WithCodeClassPrefix functional option for easy configuration.
  • Updated the <code> rendering logic to use the configured prefix.
  • Added tests to verify the behavior of the CodeClassPrefix option.
  • Updated the documentation in the README.md to include details about the new option.

This enhancement improves flexibility for users who need custom class prefixes for syntax highlighting or other styling purposes.

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.

1 participant