brackets-snippets icon indicating copy to clipboard operation
brackets-snippets copied to clipboard

Markdown(GitHub) scope doesn't work?

Open bobrocke opened this issue 9 years ago • 12 comments

I have written a snippet scoped to Markdown(GitHub) and a test document set to Markdown(GitHub).

The snippet won't trigger in that document. If I change the scope to Any, it then fires in that document.

What did I miss?

tester md www grav dev brackets

tester md www grav dev brackets

bobrocke avatar May 31 '15 13:05 bobrocke

I'm not using Emmet.

bobrocke avatar May 31 '15 14:05 bobrocke

Hi thanks for reporting this bug. Workaround: please choose Markdown rather than Markdown(GitHub).

chuyik avatar May 31 '15 15:05 chuyik

Has this fix been released? Which version should I check for?

bobrocke avatar Jun 08 '15 10:06 bobrocke

@bobrocke Yeah it should be fixed, you could try the latest one.

chuyik avatar Jun 08 '15 10:06 chuyik

I have version 1.8.1 - is that the latest that includes the fix?

bobrocke avatar Jun 08 '15 10:06 bobrocke

Yes but do you still have the same problem?

chuyik avatar Jun 08 '15 11:06 chuyik

Yes, I still have the problem. A snippet scoped to Markdown(GitHub) will not fire in a file set to that, but will if the snippet is set to Markdown. I have another Markdown syntax mode, Markdown Plus, and the same thing happens.

But perhaps this is good? Maybe the snippet should be scoped for the lowest common denominator and then work in higher levels?

bobrocke avatar Jun 08 '15 18:06 bobrocke

@bobrocke Sorry for not testing well this problem, I think the snippet scoped to Markdown should be available to all markdown files. But snippet scoped to Markdown(Github) should be only available to the Markdown(Github) syntax mode. Your thoughts?

And is there any extension for Markdown Plus support? I'd like to test that.

chuyik avatar Jun 10 '15 15:06 chuyik

Yes, I think you're right. Snippets for Markdown should work in Markdown and anything derived from Markdown (Markdown(GitHub) or Markdown Extra, as examples). Snippets for GFM should only work in Markdown(GitHub).

Markdown Plus is my own, unpublished, mode that combines Markdown(GitHub) and YAML - often used as front matter in Markdown files.

bobrocke avatar Jun 10 '15 15:06 bobrocke

@bobrocke Cool, what's the language id of Markdown Plus? I think you should know it if you write it.

chuyik avatar Jun 10 '15 16:06 chuyik

    LanguageManager.defineLanguage("markdown_plus", {
        name: "Markdown Plus",
        mode: "markdown_plus"
    });

Is that what you need?

bobrocke avatar Jun 10 '15 17:06 bobrocke

Yea~

chuyik avatar Jun 11 '15 00:06 chuyik