         e.context = element
         @errors.push(e)
 
-      lineNum += element.match(/\r\n?|\n/g)?.length or 0
+      lineNum += element.match(reLineEnding)?.length or 0
 
       for lang in @availableLanguages when lang.reClassName.test element
         lang = lang.lang
         break;
 
       lang or= @defaultLanguageCode
-      element = element.replace(/[\r\n]/g, '')
-      element = element.replace(/<br[^>]*>/ig, "\n")
+      element = element.replace(reLineEnding, '')
+      element = element.replace(reBr, "\n")
       innerText = strip_tags(element).trim()
       lang = @getLanguage(element)
       item = {startTime, languages: {}, contents: innerText}

  });
}`

class Parser
  @defaultLanguage: {className: 'KRCC', lang: 'ko', reClassName: /class[^=]*?=["']?(KRCC)["']?/i}
  @defaultLanguageCode: 'ko' 


      str = str.slice(startTagIdx+nextStartTagIdx)

      startTime = +element.match(reStartTime)?[1] or -1

      if startTime < 0
        e = new Error('ERROR_INVALID_TIME')
