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 and Survex data #7194

Merged
merged 4 commits into from
Jan 8, 2025

Conversation

mahtaran
Copy link
Contributor

@mahtaran mahtaran commented Jan 7, 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?type=code&q=NOT+is%3Afork+path%3A*.svx+NOT+%2F%5CA%28%3B%7C%5C*%5B%5E*%5D%2B%24%29%2F

Adds support for the Survex data format, a plaintext data file format used for mapping caves. At the time of writing, a search returns 2.4k Survex data files hosted on GitHub: https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.svx+%2F%5CA%28%3B%7C%5C*%5B%5E*%5D%2B%24%29%2F

Adds a heuristic to distinguish Survex data and mdsvex files.

Description

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

No grammar or LSP for Survex data files exists (yet).

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

Sample for Survex data is taken from the Philippine Surveys from the BEC expedition 2015, in particular a temporary data file created by Therion during the mapping of the Romeo cave, licenced under the Creative Commons Zero v1.0 Universal licence.

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

Survex data colour was chosen to be identical to the background colour of the navigation bar of the Survex website.

The following RegEx is used to distinguish Survex data files. All files which do not match this are assumed to be mdsvex files.

\A(;|\*[^*]+$)

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)/`
Adds support for the [Survex data](https://survex.com/docs/manual/datafile.htm) format, a plaintext data file format used for mapping caves. At the time of writing, a search returns 2.4k Survex data files hosted on GitHub: https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.svx+%2F%5CA%28%3B%7C%5C*%5B%5E*%5D%2B%24%29%2F

No grammar or LSP exists for these, to my knowledge.

Sample is taken from the [Philippine Surveys from the BEC expedition 2015](https://github.com/speleo/philippine-surveys-2015/blob/bad0f4490661908bcda3054226ab178bfa799f4a/Romeo/thTMPDIR/data.svx), in particular a temporary data file created by Therion during the mapping of the Romeo cave, licenced under the [Creative Commons Zero v1.0 Universal](https://github.com/speleo/philippine-surveys-2015/blob/bad0f4490661908bcda3054226ab178bfa799f4a/LICENSE) licence.

Colour was chosen as the [background colour of the navigation bar of the Survex website](https://survex.com).
@mahtaran mahtaran requested a review from a team as a code owner January 7, 2025 15:46
@mahtaran mahtaran mentioned this pull request Jan 7, 2025
6 tasks
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.

LGTM. Thanks.

Important

The changes in this PR will not appear on GitHub until the next release has been made and deployed. See here for more details.

@lildude lildude merged commit d2707a8 into github-linguist:main Jan 8, 2025
5 checks passed
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