Create human readable logs module on top of LatexLogParser; use it in the PDF controller.

This commit is contained in:
Paulo Reis 2016-06-16 11:14:45 +01:00
parent 241d3bfc14
commit c54f3dae20
2 changed files with 10 additions and 4 deletions

View file

@ -0,0 +1,6 @@
define [
"libs/latex-log-parser"
], (LogParser) ->
parse : (rawLog, options) ->
parsedLogEntries = LogParser.parse(rawLog, options)
return parsedLogEntries

View file

@ -1,9 +1,9 @@
define [
"base"
"ace/ace"
"libs/latex-log-parser"
"ide/human-readable-logs/HumanReadableLogs"
"libs/bib-log-parser"
], (App, Ace, LogParser, BibLogParser) ->
], (App, Ace, HumanReadableLogs, BibLogParser) ->
App.controller "PdfController", ($scope, $http, ide, $modal, synctex, event_tracking, localStorage) ->
# enable per-user containers if querystring includes isolated=true
@ -162,11 +162,11 @@ define [
accumulateResults = (newEntries) ->
for key in ['all', 'errors', 'warnings']
logEntries[key] = logEntries[key].concat newEntries[key]
# use the parsers for each file type
processLog = (log) ->
$scope.pdf.rawLog = log
{errors, warnings, typesetting} = LogParser.parse(log, ignoreDuplicates: true)
{errors, warnings, typesetting} = HumanReadableLogs.parse(log, ignoreDuplicates: true)
all = [].concat errors, warnings, typesetting
accumulateResults {all, errors, warnings}