Skip to content

Comments

MDEE (Markdown) & MDSVX (Svelte + Markdown) Language Syntax#9308

Open
Autr wants to merge 1 commit intosublimehq:masterfrom
Autr:master
Open

MDEE (Markdown) & MDSVX (Svelte + Markdown) Language Syntax#9308
Autr wants to merge 1 commit intosublimehq:masterfrom
Autr:master

Conversation

@Autr
Copy link

@Autr Autr commented Feb 12, 2026

  • I'm the package's author and/or maintainer.
  • I have have read the docs.
  • I have tagged a release with a semver version number.
  • My package repo has a description and a README describing what it's for and how to use it.
  • My package doesn't add context menu entries. *
  • My package doesn't add key bindings. **
  • Any commands are available via the command palette.
  • Preferences and keybindings (if any) are listed in the menu and the command palette, and open in split view.
  • If my package is a syntax it doesn't also add a color scheme. ***
  • I use .gitattributes to exclude files from the package: images, test files, sublime-project/workspace.

My package is similar to Markdown Extended However it should still be added because Fork of Unmaintained Package & Adds New Things

Copy link
Contributor

@deathaxe deathaxe left a comment

Choose a reason for hiding this comment

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

Further notes:

  1. The syntaxes shouldn't override default markdown or svelte file extensions. Those should stay reserved for default markdown and Svelte templates, by default.
  2. I don't think the way fenced code blocks are implemented, works well with current syntaxes. It is VERY likely those never get popped for various languages.
  3. The overall content of MDEE.sublime-syntax looks rather dated using lot's of lookbehinds. Maybe those syntaxes should better extend ST's default Markdown and only extend relevant contexts to add svelte specific template tags. You may want to have a look at Astro, Liquid or Jinja to learn how to do so.

In general it might be better to add a "Markdown (Svelte)" syntax to Svelte package, in case its template tags are to be re-used.

]
},
{
"name": "MDEE (Markdown) & MDSVX (Svelte + Markdown)",
Copy link
Contributor

Choose a reason for hiding this comment

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

The "name" will be the folder name of the package, locally. Hence it should be carefully choosen. Even though most filesystems handle it, & and co. should be avoided. It's overall a bit too verbose.

@deathaxe
Copy link
Contributor

deathaxe commented Feb 22, 2026

Further findings...

  1. Provided syntaxes, both use text.html.markdown main scope, which is already occupied by default Markdown and thus must not be used.

  2. Don't use or base anything on outdated "Markdown Extended" in 2026.

  3. According to mdesvex playground liquid style highlighting tags are not supported, despite provided MDSVX syntax claiming that.

    {% highlight cs %}
    class Foo() {
      
    }
    {% endhighlight %}
    
  4. Constructing a proper MDSVEX syntax, using ST's built-in Markdown and Svelte package requires just the following lines of code...

    %YAML 1.2
    ---
    # https://mdsvex.pngwn.io/docs
    # https://www.sublimetext.com/docs/syntax.html
    name: MDSVEX
    scope: text.html.markdown.mdsvex
    version: 2
    
    extends: Packages/Markdown/Markdown.sublime-syntax
    
    file_extensions:
      - svx
      - mdsv
      - mdsvex
    
    contexts:
      # MDSVEX doesn't support indented code blocka, yeah!!
      indented-code-blocks: []
    
      html-content:
        - include: scope:text.html.svelte#html
    
      markups:
        - meta_prepend: true
        - include: scope:text.html.svelte#svelte-blocks
        - include: scope:text.html.svelte#svelte-interpolations
        - include: scope:text.html.svelte#svelte-components

    If MarkdownEditing is installed, all its 3rd-party languages are supported in fenced code blocks, automatically.

  5. The package doesn't provide any tests to verify even most basic syntax features.

@deathaxe
Copy link
Contributor

see: corneliusio/svelte-sublime#41

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