mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Lookup correct compiler when importing v1 templates
bug: overleaf/sharelatex#981 Signed-off-by: Simon Detheridge <s@sd.ai>
This commit is contained in:
parent
6b8eb0ac23
commit
2b8ce379f8
1 changed files with 7 additions and 1 deletions
|
@ -12,6 +12,12 @@ uuid = require('uuid')
|
||||||
logger = require('logger-sharelatex')
|
logger = require('logger-sharelatex')
|
||||||
async = require("async")
|
async = require("async")
|
||||||
|
|
||||||
|
ENGINE_TO_COMPILER_MAP = {
|
||||||
|
latex_dvipdf: "latex"
|
||||||
|
pdflatex: "pdflatex"
|
||||||
|
xelatex: "xelatex"
|
||||||
|
lualatex: "lualatex"
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = TemplatesController =
|
module.exports = TemplatesController =
|
||||||
|
|
||||||
|
@ -25,7 +31,7 @@ module.exports = TemplatesController =
|
||||||
data.templateVersionId = templateVersionId
|
data.templateVersionId = templateVersionId
|
||||||
data.templateId = templateId
|
data.templateId = templateId
|
||||||
data.name = req.query.templateName
|
data.name = req.query.templateName
|
||||||
data.compiler = req.query.latexEngine
|
data.compiler = ENGINE_TO_COMPILER_MAP[req.query.latexEngine]
|
||||||
data.mainFile = req.query.mainFile
|
data.mainFile = req.query.mainFile
|
||||||
res.render path.resolve(__dirname, "../../../views/project/editor/new_from_template"), data
|
res.render path.resolve(__dirname, "../../../views/project/editor/new_from_template"), data
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue