mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add preamble parser
This commit is contained in:
parent
eaf9ae5b94
commit
a841646559
1 changed files with 14 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
define [
|
||||
"base"
|
||||
], (App) ->
|
||||
|
||||
App.factory 'preamble', (ide) ->
|
||||
|
||||
Preamble = {
|
||||
getPreambleText: () ->
|
||||
text = ide.editorManager.getCurrentDocValue().slice(0, 5000)
|
||||
preamble = text.match(/([^]*)^\\begin\{document\}/m)[1]
|
||||
|
||||
}
|
||||
|
||||
return Preamble
|
Loading…
Reference in a new issue