mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add the custom environments to the list of snippets
This commit is contained in:
parent
c25c2b676a
commit
eebd25351d
1 changed files with 14 additions and 1 deletions
|
@ -115,6 +115,19 @@ define () ->
|
||||||
docText = session.getValue()
|
docText = session.getValue()
|
||||||
customEnvironmentNames = parseCustomEnvironmentNames(docText)
|
customEnvironmentNames = parseCustomEnvironmentNames(docText)
|
||||||
# console.log customEnvironmentNames
|
# 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
|
return SnippetManager
|
||||||
|
|
Loading…
Reference in a new issue