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(theme-common): code block MagicComments support for Lua/Haskell -- and WebAssembly ;; #8870

Merged

Conversation

tarunrajput
Copy link
Contributor

@tarunrajput tarunrajput commented Apr 6, 2023

Add support for Lua, haskell, SQL and wasm comment style for MagicComments. Related #8859

Pre-flight checklist

Motivation

Test Plan

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
https://deploy-preview-8870--docusaurus-2.netlify.app/tests/pages/code-block-tests

Related issues/PRs

#8859

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 6, 2023
Comment on lines 91 to 97
default:
// All comment types
return getCommentPattern(
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should remove the lua pattern by default. There are too many false-positives

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. I have updated the PR

@netlify
Copy link

netlify bot commented Apr 6, 2023

[V2]

Name Link
🔨 Latest commit 074958a
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/643914d2f34ac000089aeced
😎 Deploy Preview https://deploy-preview-8870--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 56 🟢 97 🟢 92 🟢 100 🟢 90 Report
/docs/installation 🟠 74 🟢 100 🟢 92 🟢 100 🟢 90 Report

@tarunrajput tarunrajput force-pushed the magiccomments-add-support-for-lua-haskell branch 2 times, most recently from 66eec0c to 24cde7d Compare April 6, 2023 17:56
@tarunrajput tarunrajput force-pushed the magiccomments-add-support-for-lua-haskell branch from 24cde7d to f878bc0 Compare April 6, 2023 18:37
@slorber
Copy link
Collaborator

slorber commented Apr 13, 2023

Thanks for your PR

How can I review it?

Can you provide me a test link on the preview?

I suggest creating 3 new code blocks (lua,haskell,wasm) on /docusaurus/website/_dogfooding/_pages tests/code-block-tests.mdx so that we can see the output on the preview

@tarunrajput tarunrajput force-pushed the magiccomments-add-support-for-lua-haskell branch from 51493fe to 62358fc Compare April 13, 2023 17:56
@tarunrajput
Copy link
Contributor Author

Thanks for your PR

How can I review it?

Can you provide me a test link on the preview?

I suggest creating 3 new code blocks (lua,haskell,wasm) on /docusaurus/website/_dogfooding/_pages tests/code-block-tests.mdx so that we can see the output on the preview

@slorber, I have included the dogfooding tests, as well as added support for SQL, as its single-line comment syntax is similar to that of Lua and Haskell.

https://deploy-preview-8870--docusaurus-2.netlify.app/tests/pages/code-block-tests

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM 👍

@slorber slorber changed the title Add support for lua, haskell comment style for MagicComments feat(theme-common): code block MagicComments support for Lua/Haskell (--) and WebAssembly (;;) Apr 14, 2023
@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Apr 14, 2023
@slorber slorber changed the title feat(theme-common): code block MagicComments support for Lua/Haskell (--) and WebAssembly (;;) feat(theme-common): code block MagicComments support for Lua/Haskell -- and WebAssembly ;; Apr 14, 2023
@slorber slorber added the to backport This PR is planned to be backported to a stable version of Docusaurus label Apr 14, 2023
@slorber slorber merged commit b169404 into facebook:main Apr 14, 2023
28 checks passed
This was referenced Oct 19, 2023
@slorber slorber removed the to backport This PR is planned to be backported to a stable version of Docusaurus label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Lua comment style for MagicComments
5 participants