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

Add mdsvex #7191

Closed
wants to merge 1 commit into from
Closed

Add mdsvex #7191

wants to merge 1 commit into from

Conversation

mahtaran
Copy link
Contributor

@mahtaran mahtaran commented Jan 6, 2025

Adds support for the mdsvex language, a Markdown preprocessor for Svelte. At the time of writing, a search returns 4.1k mdsvex files hosted on GitHub: https://github.com/search?q=path%3A*.svx+NOT+%2F%5CA%28%3B%7C%5C*begin%5Cs%7C%5C*units%5Cs%29%2F+NOT+is%3Afork&type=code

Description

No grammar or LSP exists yet. Progress for these is tracked in pngwn/MDsveX#121
For code editors, files can best be marked as Markdown.

Sample is taken from sveltesociety.dev, licenced under the MIT License.

Colour was chosen to be identical to the primary accent colour of the mdsvex website

Note that the .svx extension is also used for Survex data files. Since that is currently not supported, no heuristic was added. Should the need to add such a heuristic arise in the future, the following RegEx will match for Survex data files: /\A(;|\*begin\s|\*units\s)/

Checklist:

Adds support for the [`mdsvex`](https://github.com/pngwn/MDsveX)
language, a Markdown preprocessor for Svelte. At the time of writing,
a search returns 4.1k `mdsvex` files hosted on GitHub:
https://github.com/search?q=path%3A*.svx+NOT+%2F%5CA%28%3B%7C%5C*begin%5Cs%7C%5C*units%5Cs%29%2F+NOT+is%3Afork&type=code

No grammar or LSP exists yet. Progress for these is tracked in
pngwn/MDsveX#121
For code editors, files can best be marked as Markdown.

Sample is taken from [`sveltesociety.dev`](https://github.com/svelte-society/sveltesociety.dev/blob/d2f08cc604a205e51aa8cae3856aae64498096d2/src/routes/recipes/stores/%2Bpage.svx), licenced under the [MIT License](https://github.com/svelte-society/sveltesociety.dev/blob/d2f08cc604a205e51aa8cae3856aae64498096d2/LICENSE).

Colour was chosen to be identical to the [primary accent colour of the `mdsvex` website](https://github.com/pngwn/MDsveX/blob/f29f31c281c93a1f5e604ccc9f8e4cc14208a8d8/packages/site/static/global.css#L21)

Note that the `.svx` extension is also used for [Survex data files](https://survex.com/docs/manual/datafile.htm).
Since that is currently not supported, no heuristic was added.
Should the need to add such a heuristic arise in the future,
the following RegEx will match for Survex data files:
`/\A(;|\*begin\s|\*units\s)/`
@mahtaran mahtaran requested a review from a team as a code owner January 6, 2025 21:43
@lildude lildude changed the title feat: add mdsvex Add mdsvex Jan 7, 2025
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

Looks like Survex is popular enough for inclusion so please add it and the heuristic in this PR to ensure they don't get incorrectly classified.

@mahtaran mahtaran closed this Jan 7, 2025
@mahtaran mahtaran deleted the feature/mdsvex branch January 7, 2025 14:56
@mahtaran
Copy link
Contributor Author

mahtaran commented Jan 7, 2025

(Renamed branch to clarify addition of Survex, will create a new PR shortly)

@lildude
Copy link
Member

lildude commented Jan 7, 2025

You didn't need to. We don't care about branch names or clean history as everything is squashed on merge.

@mahtaran
Copy link
Contributor Author

mahtaran commented Jan 7, 2025

Ah, I see. To be completely honest, I had expected GitHub's "rename branch" functionality would also update the base branch of this PR, instead of closing it. New PR is #7194, apologies for the additional effort.

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.

2 participants