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

feat(showcase): use marked and prismjs to highlight the code #2436

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fpaul-1A
Copy link
Contributor

@fpaul-1A fpaul-1A commented Nov 8, 2024

Proposed change

Following #2414
Replace all usage of highlight.js to prismjs

Related issues

- No issue associated -

@fpaul-1A fpaul-1A requested a review from a team as a code owner November 8, 2024 17:36
Copy link

nx-cloud bot commented Nov 8, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 4bc6de7. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx run-many --target=test-int --parallel 3
✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.85%. Comparing base (331f0da) to head (4bc6de7).
Report is 8 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@fpaul-1A fpaul-1A force-pushed the feat/showcase-prism branch 2 times, most recently from 219c074 to 7b7eb1d Compare November 12, 2024 10:35
Copy link
Contributor

Choose a reason for hiding this comment

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

Aligned the theme would be nice, they do not have css var that we can map to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there are lots of themes we can choose from
I picked this theme to match the one we use in the training (as much as possible, prismjs uses regexes not actual grammar)

@fpaul-1A fpaul-1A force-pushed the feat/showcase-prism branch 2 times, most recently from acc9d88 to cf19c15 Compare November 14, 2024 11:02
},
markedExtensions: [markedAlert()],
/* Templates are only internal, no need to sanitize */
sanitize: SecurityContext.NONE
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you can't use HTML because you might have some logic for the clipboard?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to add an html attribute on the marked extension to match the CSS of the DF
HTML attributes are sanitized by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants