             path.resolve(path.dirname(@latex.mainFile), result[1]) else \
             @latex.mainFile
           line: if result[2] then parseInt result[2], 10 else undefined
-        continue
 
     types = items.map((item) -> item.type)
     if types.indexOf('error') > -1

    @lastFile = @latex.mainFile

  trimLatexmk: (log) ->
    log = log.replace(/(.{78}(\w|\s|\d|\\|\/))(\r\n|\n)/g, '$1')
    lines = log.replace(/(\r\n)|\r/g, '\n').split('\n')
    finalLine = -1
    for index of lines

{ Disposable } = require 'atom'
path = require 'path'

fileName = /^.*?\(\.?\/?([^\)\s]*?)\.\w+/
latexFile = /^.*?\(\.?\/?([^\)\s]*?\.\w+)/
latexPattern = /^Output\swritten\son\s(.*)\s\(.*\)\.$/gm
latexFatalPattern = /Fatal error occurred, no output PDF file produced!/gm
latexError = /^(?:(.*):(\d+):|!)(?: (.+) Error:)? (.+?)\.?$/gm
latexBox = /^((?:Over|Under)full \\[vh]box \([^)]*\)) (?:in paragraph at lines|has occurred while \\output is active) \[?(\d+)[-.]+(\d+)\]?\)?$/gm
latexWarn = /^((?:(?:Class|Package) \S+)|LaTeX(?: Font)?) (Warning|Info):\s+([\s\S]*?)(?: on input line (\d+))?\.$/gm

latexmkPattern = /^Latexmk:\sapplying\srule/gm
latexmkPatternNoGM = /^Latexmk:\sapplying\srule/
