mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
allow HumanReadableLogs to accept an already parsed log
This commit is contained in:
parent
e99176c0d0
commit
d4c5028350
1 changed files with 4 additions and 1 deletions
|
@ -3,7 +3,10 @@ define [
|
|||
"ide/human-readable-logs/HumanReadableLogsRules"
|
||||
], (LogParser, ruleset) ->
|
||||
parse : (rawLog, options) ->
|
||||
parsedLogEntries = LogParser.parse(rawLog, options)
|
||||
if typeof rawLog is 'string'
|
||||
parsedLogEntries = LogParser.parse(rawLog, options)
|
||||
else
|
||||
parsedLogEntries = rawLog
|
||||
|
||||
_getRule = (logMessage) ->
|
||||
return rule for rule in ruleset when rule.regexToMatch.test logMessage
|
||||
|
|
Loading…
Reference in a new issue