Add preamble parser

This commit is contained in:
Shane Kilkelly 2017-07-31 11:28:21 +01:00
parent eaf9ae5b94
commit a841646559

View file

@ -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