mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 15:19:02 +02:00
Add the custom environments to the list of snippets
This commit is contained in:
+14
-1
@@ -115,6 +115,19 @@ define () ->
|
||||
docText = session.getValue()
|
||||
customEnvironmentNames = parseCustomEnvironmentNames(docText)
|
||||
# console.log customEnvironmentNames
|
||||
callback null, staticSnippets
|
||||
snippets = staticSnippets.concat(
|
||||
customEnvironmentNames.map (name) ->
|
||||
{
|
||||
caption: "\\begin{#{name}}..."
|
||||
snippet: """
|
||||
\\begin{#{name}}
|
||||
\t$1
|
||||
\\end{#{name}}
|
||||
"""
|
||||
meta: "env"
|
||||
|
||||
}
|
||||
)
|
||||
callback null, snippets
|
||||
|
||||
return SnippetManager
|
||||
|
||||
Reference in New Issue
Block a user