Skip to content

Scaladoc: Fix emphasis rule in hljs config #12887

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

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

pikinier20
Copy link
Contributor

closes #12868

I've figured out that:

  • hljs enters comment parsing mode on /**
  • hljs finds * so it enters emphasis mode
  • hljs looks for * to exit emphasis mode and it finds * in */
  • hljs takes * from */ so it can't exit comment and takes next line as comment

So my solution is to check in begin condition of emphasis mode if the next * char is not followed by / (marks comment end) and * (potentially starts bold mode)

@pikinier20 pikinier20 changed the title Scaladoc: Remove emphasis rule from hljs config Scaladoc: Fix emphasis rule in hljs config Jun 21, 2021
Copy link
Contributor

@TheElectronWill TheElectronWill left a comment

Choose a reason for hiding this comment

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

Nice solution!

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.

Scaladoc wrongly interprets markdown inside code blocks
2 participants