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

Replace highlight.js with static highlighting using Pandoc #437

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TauOmicronMu
Copy link
Collaborator

🥳 🎉

@isomorpheme isomorpheme force-pushed the static-highlighting branch from 5cde36a to 09c539b Compare June 12, 2023 13:13
Co-authored-by: tauomicronmu <tauomicronmurs@gmail.com>
@isomorpheme isomorpheme force-pushed the static-highlighting branch from 09c539b to 3eab4ff Compare June 12, 2023 13:14
Copy link
Contributor

@david-christiansen david-christiansen left a comment

Choose a reason for hiding this comment

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

For Haskell, this looks great to me.

But for other languages, it looks like Haskell highlighting is being used. Here's some YAML:
image

Shouldn't it branch on the code block language, or alternatively on the filename?

thanks!

other -> other,
field "before" (maybe (pure "<not present>") (fmap itemBody . load . itemIdentifier) . view _2 . itemBody),
field "after" (maybe (pure "<not present>") (fmap itemBody . load . itemIdentifier) . view _3 . itemBody)
-- TODO: pick the right language
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a stale TODO?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll have a look at it now!

@TauOmicronMu TauOmicronMu marked this pull request as draft June 13, 2023 14:35
case takeExtension name of
".hs" -> "haskell"
_ -> ""
pure $ T.unpack $ highlight language $ T.pack $ exampleText

Check notice

Code scanning / HLint

Redundant $

message-index/site.hs:93:81:&nbsp;Suggestion:&nbsp;Redundant&nbsp;$ &nbsp;&nbsp; Found: &nbsp;&nbsp;T.pack&nbsp;$&nbsp;exampleText &nbsp;&nbsp; Perhaps: &nbsp;&nbsp;T.pack&nbsp;exampleText
Co-authored-by: Daan Rijks <daanrijks@pm.me>
@TauOmicronMu TauOmicronMu force-pushed the static-highlighting branch from 56037cd to d2cf854 Compare June 19, 2023 14:09
@david-christiansen
Copy link
Contributor

Is this still a draft? What do you see as the remaining tasks for un-drafting it?

@TauOmicronMu
Copy link
Collaborator Author

@isomorpheme - completely forgot about this -> do you remember what we had left to do (if anything)?

@isomorpheme
Copy link
Collaborator

@TauOmicronMu Hmm, I don't remember anything besides what's already mentioned in this PR (mainly picking the right language to highlight with). And this needs a rebase to fix merge conflicts of course.

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.

3 participants