Closed spdustin closed 7 years ago
One concern I have is the similarity to Lo-Dash/Underscore templates. The regex you used would match all three Lo-Dash delimiters <%
, <%-
and <%=
. If the highlighting looks great (and not busy or distracting), this would be a good thing.
I'll comment on a couple of other things, but I want to say thanks for doing the PR. I really appreciate it, and you did a great job. It's clean and it's nice that you updated the README. Thank you.
This markup would only apply to the extensions in the header, so I wouldn't expect to see handlebars. It would only match <%
followed by a space, btw, so yeah it would catch part of that lodash... Is there a way to limit match only to a specific extension? Maybe it needs to be a separate definition just for .md.erb files rather than the whole list.
I'd like to get it to a place of utility, though - I'm open to whatever suggestions. Let's figure this out!
Makes me think tho... A master syntax spec that's included by multiple child specs that associate with .md.ext files, with each ext supporting the relevant template placeholders/tokens... I'm also investigating if the syntax can switch slightly based on the extension without having multiple definitions.
The only way to limit the scope of the patterns within a syntax definition is by parent scope (I guess also by a header var, maybe?) so that means the only way to truly isolate these patterns to *.md.erb
files would be to separate it into another syntax definition and just include text.html.markdown
. Haven't tested including a package-installed syntax like that from the same package but I don't see why it wouldn't work.
What are your thoughts?
Wow really sorry, sometimes I just don't see these replies.
Haven't tested including a package-installed syntax like that from the same package but I don't see why it wouldn't work.
Sounds like a good idea, if you're still interested in this I'd be happy to collaborate on getting it to work
closing based on age and lack of response
This PR adds:
{:.class}
-style inline attributes, supported by some Markdown parsers