mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
use validate as keyword for syntax checks
This commit is contained in:
parent
14a0499b56
commit
5da1b90418
2 changed files with 10 additions and 3 deletions
|
@ -30,7 +30,7 @@ module.exports = CompileController =
|
|||
if req.body?.draft
|
||||
options.draft = req.body.draft
|
||||
if req.body?.check
|
||||
options.check = if req.body.check is "error" then "error" else "warn"
|
||||
options.check = if req.body.check is "validate" then "validate" else undefined
|
||||
logger.log {options:options, project_id:project_id, user_id:user_id}, "got compile request"
|
||||
CompileManager.compile project_id, user_id, options, (error, status, outputFiles, clsiServerId, limits, validationProblems) ->
|
||||
return next(error) if error?
|
||||
|
|
|
@ -86,7 +86,7 @@ define [
|
|||
return $http.post url, {
|
||||
rootDoc_id: options.rootDocOverride_id or null
|
||||
draft: $scope.draft
|
||||
check: if options.check then "error" else "warn"
|
||||
check: if options.check then "validate" else null
|
||||
_csrf: window.csrfToken
|
||||
}, {params: params}
|
||||
|
||||
|
@ -129,6 +129,12 @@ define [
|
|||
$scope.pdf.view = 'errors'
|
||||
$scope.pdf.compileTerminated = true
|
||||
fetchLogs(fileByPath)
|
||||
else if response.status in ["validation-fail", "validation-pass"]
|
||||
$scope.pdf.view = 'pdf'
|
||||
$scope.pdf.compileExited = true
|
||||
$scope.pdf.url = last_pdf_url
|
||||
$scope.shouldShowLogs = true
|
||||
fetchLogs(fileByPath)
|
||||
else if response.status == "exited"
|
||||
$scope.pdf.view = 'pdf'
|
||||
$scope.pdf.compileExited = true
|
||||
|
@ -249,7 +255,8 @@ define [
|
|||
else
|
||||
warnings.push result
|
||||
all = [].concat errors, warnings
|
||||
accumulateResults {type: "ChkTeX", all, errors, warnings}
|
||||
logHints = HumanReadableLogs.parse {type: "Validation", all, errors, warnings}
|
||||
accumulateResults logHints
|
||||
|
||||
processBiber = (log) ->
|
||||
{errors, warnings} = BibLogParser.parse(log, {})
|
||||
|
|
Loading…
Reference in a new issue