Replies: 2 comments 3 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @sleepymalc I am encountering some trouble with your function for math scoping vs the minimal one taken from Hypersnips website. Using the minimal one renders snippets properly while using the one you linked to does not trigger. Do you have any suggestions to help debug why one works and not the other? Can I go incrementally starting from the minimal one? If I can, then, I can try out 3 or 4 incremental functions leading from the minimal one to yours and perhaps that will help figure out where the function fails? Thanks. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
From here, math mode detection is done via:
return context.scopes.findLastIndex(s => s.startsWith("meta.math")) > context.scopes.findLastIndex(s => s.startsWith("comment") || s.startsWith("meta.text.normal.tex"));
while on the original Hypersnips website, it is done via more minimal:
return context.scopes.some(s => s.startsWith("meta.math"));
Could the difference in the semantics between the two forms be briefly explained? Whatever is the language in which these commands are written (Python ? Javascript?) , I am not familiar with that. Hence this question.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions