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

Block quotes with backticks not highlighting #362

Open
projectaki opened this issue Jan 29, 2022 · 2 comments
Open

Block quotes with backticks not highlighting #362

projectaki opened this issue Jan 29, 2022 · 2 comments
Labels
enhancement Improvement request

Comments

@projectaki
Copy link

Hi, I have an issue with inline code blocks. I have marked and Prismjs configured, with the scripts and styles in angular.json. Using the codeblocks with 3 backticks works perfectly fine, and in the html it generates a pre > code with class= . Prismjs correctly highlights this using the theme.

The issue is with the single backticks. This generates a code html element around the text, without a class. Therefore Prism doesnt highlight it. When I try to do a custom code element and give it a class, then Prism will highlight it as expected.

I would like to put backticks around my text in markdown file, and have that automatically get highlighted.

Is this possible ngx-markdown?

@alexander-kastil
Copy link

I have the same request / issue. Is the a solution / plugin for using single backticks?

@jfcere
Copy link
Owner

jfcere commented Nov 13, 2023

This is old but true, single back ticks are not handled currently but I'll add this on the enhancement list as this is indeed something expected.

In the meanwhile, the workaround I used in the demo is to customize the code elements with global CSS

code:not([class*="language-"]) {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  font-size: 0.94em;
  padding: 0px 6px 2px;
  overflow-wrap: break-word;
}

@jfcere jfcere added the enhancement Improvement request label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement request
Projects
None yet
Development

No branches or pull requests

3 participants