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

Allow treating a missing highlight language as error #2642

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

SamWilsn
Copy link

This is a tiny non-breaking feature. I already did the work before seeing the note about your forum in the pull request template. I hope I'm not being too rude by skipping making a post there 😅

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

@@ -27,6 +41,8 @@ pub struct ThemeCss {
pub struct Markdown {
/// Whether to highlight all code blocks found in markdown files. Defaults to false
pub highlight_code: bool,
/// Emit either "error" or "warn" for missing highlight languages. Defaults to "warn".
pub highlight_missing_level: HighlightLanguageLevel,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we can just do error_on_unknown_highlight. Do we have anything other than error or warn?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going for symmetry with internal_level in the link checker. I don't have a strong preference.

I suppose we could also have a "do nothing" level, if users are annoyed by the warnings.

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.

2 participants