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

Explore enabling syntax highlight for codeblock #490

Open
sivaraam opened this issue Mar 28, 2021 · 4 comments
Open

Explore enabling syntax highlight for codeblock #490

sivaraam opened this issue Mar 28, 2021 · 4 comments

Comments

@sivaraam
Copy link
Member

Right now, the language of the codeblock mentioned near the starting part seems ignored in the rendered page. We could explore if we could use some plug-in to properly syntax highlight the codeblocks using the language mentioned.

Would that be a good enhancement?

@chriscool
Copy link
Collaborator

Are you talking about a specific page here? It's not clear which one.

Also about "the language of the codeblock mentioned near the starting part", do you mean that codeblocks that are far from the start don't have the same issue?

In general, yeah, I would be ok with improving syntax highlighting.

@sivaraam
Copy link
Member Author

Are you talking about a specific page here? It's not clear which one.

Nope. I'm talking about codeblocks in general. A specific example would be the first codeblock found in edition 73. The codeblock was qualified with the language "shell" as one could see in the raw text of the edition. It was syntax highlighted properly in GitHub's markdown rendering (observed the comments being dimmed). But in the website, the codeblock doesn't appear to be syntax highlighted. That's the thing I thought of improving.

Also about "the language of the codeblock mentioned near the starting part", do you mean that codeblocks that are far from the start don't have the same issue?

No. I was trying to refer to the first line in a markdown block like the following where the language of the codeblock is mentioned:

```shell
gitdir=$(git rev-parse --git-dir)
# We need delete_self to pick up changes to HEAD (since it gets renamed
# over), and "move" to pick up changes in the refs directories.
inotifywait -qq -t 60 -e delete_self -e move -r "$gitdir/HEAD" "$gitdir/refs"
```

! In general, yeah, I would be ok with improving syntax highlighting.
Ok 👍🏼

@chriscool
Copy link
Collaborator

Ok, sorry for my misunderstanding. I guess it's because it was late and I was tired. And yeah, I think it's a good idea to have syntax highlighting on the website too.

I don't know the reason why it doesn't work and what we could do about that though. If you find a plugin that could do it, yeah I am ok with testing it. Thanks!

@sivaraam
Copy link
Member Author

sivaraam commented Apr 5, 2021

Ok, sorry for my misunderstanding. I guess it's because it was late and I was tired. And yeah, I think it's a good idea to have syntax highlighting on the website too.

No worries. I didn't quite detail it so well in the initial description either 🙂

I don't know the reason why it doesn't work and what we could do about that though. If you find a plugin that could do it, yeah I am ok with testing it. Thanks!

Great! Let me see what I get.

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

No branches or pull requests

2 participants