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: markdown syntax highlighting #316

Merged
merged 4 commits into from
Feb 14, 2025

Conversation

alex-mcgovern
Copy link
Collaborator

Fixes a long-standing bug with Syntax highlighting in markdown.

This should also allow us to allow @danbarr to document functionality (e.g. certificates) in plain markdown, rather than the current solution, which is limiting.

As an added bonus, the syntax theme is now based on colors from our palette, so should feel more consistent with the rest of the application, and respects the user's dark/light preference.

Before

Screenshot 2025-02-14 at 10 45 59 AM

After

Screenshot 2025-02-14 at 10 43 18 AM Screenshot 2025-02-14 at 10 43 24 AM

Copy link

stacklok-cloud-staging bot commented Feb 14, 2025

Minder Vulnerability Report ⚠️

Minder found vulnerable dependencies in this PR. Either push an updated version or accept the proposed changes. Note that accepting the changes will include Minder as a co-author of this PR.

Vulnerability scan of a0b80822:

  • 🐞 vulnerable packages: 1
  • 🛠 fixes available for: 1
Package Version #Vulnerabilities #Fixes Patch
trim 0.0.1 1 1 0.0.3

Summary of vulnerabilities found

Minder found the following vulnerabilities in this PR:
Ecosystem Name Version Vulnerability ID Summary Introduced Fixed
npm trim 0.0.1 GHSA-w5p7-h5w8-2hfq Regular Expression Denial of Service in trim 0 0.0.3

stacklok-cloud-staging[bot]

This comment was marked as spam.

@coveralls
Copy link
Collaborator

coveralls commented Feb 14, 2025

Pull Request Test Coverage Report for Build 13328529376

Details

  • 3 of 12 (25.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.6%) to 67.926%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/Markdown.tsx 3 12 25.0%
Totals Coverage Status
Change from base Build 13328521386: -0.6%
Covered Lines: 771
Relevant Lines: 1067

💛 - Coveralls

@alex-mcgovern alex-mcgovern dismissed stacklok-cloud-staging[bot]’s stale review February 14, 2025 10:53

Not sure what minder is suggesting or if it will break things.

@stacklok-cloud-staging stacklok-cloud-staging bot dismissed their stale review February 14, 2025 11:31

Previous Minder review was dismissed because the PR was updated

stacklok-cloud-staging[bot]

This comment was marked as spam.

Copy link

@stacklok-cloud-staging stacklok-cloud-staging bot left a comment

Choose a reason for hiding this comment

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

Dependency Information

Minder analyzed the dependencies introduced in this pull request and detected that some dependencies do not meet your security profile.

📦 Dependency: attach-ware

⚠️ Archived Package: This package is marked as deprecated. Proceed with caution!

Archived packages are no longer updated or maintained. This can lead to security vulnerabilities and compatibility issues.

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 3.9
Repository activity 1.2
User activity 6.6
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 1
Number of git tags or releases 3
Versions matched to tags or releases 1
Alternatives
Package Description
connect
express

📦 Dependency: hast

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 5.7
Repository activity 3.6
User activity 7.9
Provenance unknown
Alternatives
Package Description
rehype

📦 Dependency: lower-case

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 6.5
Repository activity 4.6
User activity 8.4
Provenance historical_provenance_mismatched

📦 Dependency: param-case

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 6.5
Repository activity 4.6
User activity 8.4
Provenance unknown

📦 Dependency: sentence-case

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Provenance unknown
Alternatives
Package Description
title-case
to-title-case

📦 Dependency: trim

⚠️ Archived Package: This package is marked as deprecated. Proceed with caution!

Archived packages are no longer updated or maintained. This can lead to security vulnerabilities and compatibility issues.

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 5.2
Repository activity 1.3
User activity 9
Provenance unknown
Alternatives
Package Description
lodash.trim
string.prototype.trim
trim-whitespace

@stacklok-cloud-staging stacklok-cloud-staging bot dismissed their stale review February 14, 2025 11:45

Previous Minder review was dismissed because the PR was updated

Comment on lines +13759 to +13764
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
"integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==",
"deprecated": "Use String.prototype.trim() instead",
"dev": true
},

Choose a reason for hiding this comment

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

Suggested change
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
"integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==",
"deprecated": "Use String.prototype.trim() instead",
"dev": true
},
"node_modules/trim": {
"version": "0.0.1",
0.0.1
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/trim/-/trim-0.0.3.tgz",
"integrity": "sha512-h82ywcYhHK7veeelXrCScdH7HkWfbIT1D/CgYO+nmDarz3SGNssVBMws6jU16Ga60AJCRAvPV6w6RLuNerQqjg==",

Copy link

@stacklok-cloud-staging stacklok-cloud-staging bot left a comment

Choose a reason for hiding this comment

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

Dependency Information

Minder analyzed the dependencies introduced in this pull request and detected that some dependencies do not meet your security profile.

📦 Dependency: attach-ware

⚠️ Archived Package: This package is marked as deprecated. Proceed with caution!

Archived packages are no longer updated or maintained. This can lead to security vulnerabilities and compatibility issues.

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 3.9
Repository activity 1.2
User activity 6.6
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 1
Number of git tags or releases 3
Versions matched to tags or releases 1
Alternatives
Package Description
connect
express

📦 Dependency: hast

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 5.7
Repository activity 3.6
User activity 7.9
Provenance unknown
Alternatives
Package Description
rehype

📦 Dependency: lower-case

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 6.5
Repository activity 4.6
User activity 8.4
Provenance historical_provenance_mismatched

📦 Dependency: param-case

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 6.5
Repository activity 4.6
User activity 8.4
Provenance unknown

📦 Dependency: sentence-case

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Provenance unknown
Alternatives
Package Description
title-case
to-title-case

📦 Dependency: trim

⚠️ Archived Package: This package is marked as deprecated. Proceed with caution!

Archived packages are no longer updated or maintained. This can lead to security vulnerabilities and compatibility issues.

⚠️ Deprecated Package: This package is marked as archived. Proceed with caution!

Scoring details
Component Score
Package activity 5.2
Repository activity 1.3
User activity 9
Provenance unknown
Alternatives
Package Description
lodash.trim
string.prototype.trim
trim-whitespace

@alex-mcgovern alex-mcgovern merged commit 35ba1a4 into main Feb 14, 2025
7 checks passed
@alex-mcgovern alex-mcgovern deleted the fix/markdown-syntax-highlighting branch February 14, 2025 11:47
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