mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #1001 from sharelatex/spd-v1-template-compiler
Lookup correct compiler when importing v1 templates
This commit is contained in:
commit
453b5fbd71
1 changed files with 7 additions and 1 deletions
|
@ -12,6 +12,12 @@ uuid = require('uuid')
|
|||
logger = require('logger-sharelatex')
|
||||
async = require("async")
|
||||
|
||||
ENGINE_TO_COMPILER_MAP = {
|
||||
latex_dvipdf: "latex"
|
||||
pdflatex: "pdflatex"
|
||||
xelatex: "xelatex"
|
||||
lualatex: "lualatex"
|
||||
}
|
||||
|
||||
module.exports = TemplatesController =
|
||||
|
||||
|
@ -25,7 +31,7 @@ module.exports = TemplatesController =
|
|||
data.templateVersionId = templateVersionId
|
||||
data.templateId = templateId
|
||||
data.name = req.query.templateName
|
||||
data.compiler = req.query.latexEngine
|
||||
data.compiler = ENGINE_TO_COMPILER_MAP[req.query.latexEngine]
|
||||
data.mainFile = req.query.mainFile
|
||||
res.render path.resolve(__dirname, "../../../views/project/editor/new_from_template"), data
|
||||
|
||||
|
|
Loading…
Reference in a new issue