       errors.push error = new Error('ERROR_INVALID_LANGUAGE_DEFINITION')
       return
 
+  errors = []
+  definedLangs = {
+    KRCC: {
+      lang: 'ko'
+      reClassName: new RegExp("class[^=]*?=[\"'\S]*(KRCC)['\"\S]?", 'i')
+    },
+    KR: {
+      lang: 'ko'
+      reClassName: new RegExp("class[^=]*?=[\"'\S]*(KR)['\"\S]?", 'i')
+    },
+    ENCC: {
+      lang: 'en'
+      reClassName: new RegExp("class[^=]*?=[\"'\S]*(ENCC)['\"\S]?", 'i')
+    },
+    EGCC: {
+      lang: 'en'
+      reClassName: new RegExp("class[^=]*?=[\"'\S]*(EGCC)['\"\S]?", 'i')
+    },
+    EN: {
+      lang: 'en'
+      reClassName: new RegExp("class[^=]*?=[\"'\S]*(EN)['\"\S]?", 'i')
+    },
+    JPCC: {
+      lang: 'ja'
+      reClassName: new RegExp("class[^=]*?=[\"'\S]*(JPCC)['\"\S]?", 'i')
+    }
+  }
+
   if options?.definedLangs
     for key, value of options.definedLangs
       definedLangs[key] = value
+
+  sami = sami.trim()
   getDefinedLangs()
   result = parse()
   return {result, errors: errors}

  });
}`

reOpenSync = /<sync/i
reCloseSync = /<sync|<\/body|<\/sami/i
reLineEnding = /\r\n?|\n/g
reBrokenTag = /<[a-z]*[^>]*<[a-z]*/g
reStartTime = /<sync[^>]+?start[^=]*=[^0-9]*([0-9]*)["^0-9"]*/i
reBr = /<br[^>]*>/ig
reStyle = /<style[^>]*>([\s\S]*?)<\/style[^>]*>/i
reComment = /(<!--|-->)/g

_sort = (langItem) ->
  langItem.sort((a, b) ->
    if (res = a.startTime - b.startTime) is 0

cssParse = require 'css-parse'
langCodes = require './lang_codes.js'

reOpenSync = /<sync/i
reCloseSync = /<sync|<\/body|<\/sami/i
reLineEnding = /\r\n?|\n/g
reBrokenTag = /<[a-z]*[^>]*<[a-z]*/g
reStartTime = /<sync[^>]+?start[^=]*=[^0-9]*([0-9]*)["^0-9"]*/i
reBr = /<br[^>]*>/ig
reStyle = /<style[^>]*>([\s\S]*?)<\/style[^>]*>/i
reComment = /(<!--|-->)/g

# from http://coffeescriptcookbook.com/chapters/classes_and_objects/cloning
clone = (obj) ->
  if not obj? or typeof obj isnt 'object'
