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

Fix syntax highlighting #187

Merged
merged 2 commits into from
Aug 9, 2024
Merged

Fix syntax highlighting #187

merged 2 commits into from
Aug 9, 2024

Conversation

Hysterelius
Copy link
Contributor

Currently if you try and highlight a line without line numbers, you get this:
image

So, I have fixed the scss to make it work on both styles of code blocks, I have also added some css to make nice rounded corners.
image

But this rounded corners css does kind of mess up how it looks - so I am happy if you want to get rid of it.
image

Copy link

netlify bot commented Aug 2, 2024

Deploy Preview for abridge ready!

Name Link
🔨 Latest commit 8c615af
🔍 Latest deploy log https://app.netlify.com/sites/abridge/deploys/66b534ae2b5a950008e4e425
😎 Deploy Preview https://deploy-preview-187--abridge.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Jieiku
Copy link
Owner

Jieiku commented Aug 2, 2024

I would prefer this fix without the rounded corners for my own blog, but others might want this.

So I say to either remove the rounded corners or set an option for it in scss (maybe coderoundhighlight)

To add an option:

$code: true !default;//codeblocks, code, pre, kbd

@if $code {

Then you also need to add the same option in the overrides file:

//$code: true,//codeblocks, code, pre, kbd

If you add an option, make the default that the rounded corners are off, which will result in a smaller/lighter abridge.css once compiled, then users can add the rounded corners if they like. The option could also be mentioned in https://github.com/Jieiku/abridge/blob/master/content/overview-code-blocks.md

Thanks for finding this issue, I did not think to check highlighting without line numbers when I was implementing this.

@Jieiku
Copy link
Owner

Jieiku commented Aug 4, 2024

I think once this is in I will draft a new abridge release, the last release was based on Zola 0.18.0

@Jieiku Jieiku merged commit d5acabc into Jieiku:master Aug 9, 2024
4 of 5 checks passed
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