mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-17 09:13:13 +00:00
infrastructure for using ace syntax checking
This commit is contained in:
parent
6c716ca252
commit
0a350c8e3f
3 changed files with 9 additions and 2 deletions
|
@ -176,6 +176,8 @@ module.exports = (grunt) ->
|
|||
name: "libs"
|
||||
},{
|
||||
name: "ace/mode-latex"
|
||||
},{
|
||||
name: "ace/worker-latex"
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
@ -130,10 +130,11 @@ block content
|
|||
- var pdfPath = 'libs/pdfjs-1.3.91p1/pdf.worker.js'
|
||||
- var fingerprintedPath = fingerprint(jsPath+pdfPath)
|
||||
- var pdfJsWorkerPath = buildJsPath(pdfPath, {cdn:false,qs:{fingerprint:fingerprintedPath}}) // don't use worker for cdn
|
||||
|
||||
- var aceWorkerPath = buildJsPath("ace", {cdn:false,fingerprint:false}) // don't use worker for cdn
|
||||
|
||||
script(type='text/javascript').
|
||||
window.pdfJsWorkerPath = "#{pdfJsWorkerPath}";
|
||||
window.aceWorkerPath = "#{aceWorkerPath}";
|
||||
|
||||
script(
|
||||
data-main=buildJsPath("ide.js", {fingerprint:false}),
|
||||
|
|
|
@ -9,7 +9,11 @@ define [
|
|||
"ide/editor/directives/aceEditor/cursor-position/CursorPositionManager"
|
||||
], (App, Ace, SearchBox, UndoManager, AutoCompleteManager, SpellCheckManager, HighlightsManager, CursorPositionManager) ->
|
||||
EditSession = ace.require('ace/edit_session').EditSession
|
||||
|
||||
|
||||
# set the path for ace workers if using a CDN (from editor.jade)
|
||||
if window.aceWorkerPath?
|
||||
ace.config.set('workerPath', "#{window.aceWorkerPath}");
|
||||
|
||||
# Ace loads its script itself, so we need to hook in to be able to clear
|
||||
# the cache.
|
||||
if !ace.config._moduleUrl?
|
||||
|
|
Loading…
Reference in a new issue