mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 09:42:00 +00:00
Remove chktex fetching and parsing from migrated PDF preview (#5409)
GitOrigin-RevId: 3c6721a1272d809679ec1e2f2fcd1a7251e1321b
This commit is contained in:
parent
e26d47cb41
commit
ce3b304ec8
2 changed files with 0 additions and 41 deletions
|
@ -1,28 +0,0 @@
|
|||
export const ChkTeXParser = {
|
||||
parse(log) {
|
||||
const errors = []
|
||||
const warnings = []
|
||||
|
||||
for (const line of log.split('\n')) {
|
||||
const m = line.match(/^(\S+):(\d+):(\d+): (Error|Warning): (.*)/)
|
||||
|
||||
if (m) {
|
||||
const result = {
|
||||
file: m[1],
|
||||
line: m[2],
|
||||
column: m[3],
|
||||
level: m[4].toLowerCase(),
|
||||
message: `${m[4]}: ${m[5]}`,
|
||||
}
|
||||
|
||||
if (result.level === 'error') {
|
||||
errors.push(result)
|
||||
} else {
|
||||
warnings.push(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { errors, warnings }
|
||||
},
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
import getMeta from '../../../utils/meta'
|
||||
import HumanReadableLogs from '../../../ide/human-readable-logs/HumanReadableLogs'
|
||||
import BibLogParser from '../../../ide/log-parser/bib-log-parser'
|
||||
import { ChkTeXParser } from './chktex-log-parser'
|
||||
import { buildFileList } from './file-list'
|
||||
|
||||
const searchParams = new URLSearchParams(window.location.search)
|
||||
|
@ -106,18 +105,6 @@ export const handleOutputFiles = async (projectId, data) => {
|
|||
accumulateResults({ errors, warnings }, 'BibTeX:')
|
||||
}
|
||||
|
||||
const chktexFile = outputFiles.get('output.chktex')
|
||||
|
||||
if (chktexFile) {
|
||||
const response = await fetch(`${chktexFile.url}?${params}`)
|
||||
|
||||
const log = await response.text()
|
||||
|
||||
const { errors, warnings } = ChkTeXParser.parse(log)
|
||||
|
||||
accumulateResults({ errors, warnings }, 'Syntax')
|
||||
}
|
||||
|
||||
result.fileList = buildFileList(outputFiles, data.clsiServerId)
|
||||
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue