-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add code block inline marking, including ins & del marker types #1160
Add code block inline marking, including ins & del marker types #1160
Conversation
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
Looks like Netlify's Node.js version doesn't support the RegExp flag |
I added a fallback that seems to work well. https://deploy-preview-1160--astro-docs-2.netlify.app/en/core-concepts/framework-components/ :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This totally looks like another instance of “Hippo builds an entire useful ecosystem package inside docs” so like for the link checker, I’d encourage you to consider looking at wrapping this up as a “Rocket-fueled Syntax Highlighter” npm package so we can share the brilliance and make it easier to add tests etc.
What kind of changes does this PR include?
Description
{4-5,10}
(if no marker type prefix is given, it defaults tomark
)mark={4-5,10}
del={4-5,10}
(new, marks a deleted line, alias name:rem
)ins={4-5,10}
(new, marks an added line, alias name:add
)/sidebar/
(if no marker type prefix is given, it defaults tomark
)mark=/sidebar/
(all common regular expression features are supported)mark=/slot="(.*?)"/
(if capture groups are contained, these will be marked)del=/src\/pages\/.*\.astro/
(escaping special chars with a backslash works, too)ins=/this|that/
escapeHtml
/unescapeHtml
functions with the battle-testedhtml-escaper
package.framework-components.md
:add
/ins
type: