<commit_before>if window?
  coffeekup = window.CoffeeKup = {}
  coffee = if CoffeeScript? then CoffeeScript else null
else
  coffeekup = exports
  coffee = require 'coffee-script'

coffeekup.version = '0.2.3'

skeleton = (ck_options = {}) ->
  ck_options.context ?= {}
  ck_options.locals ?= {}
  ck_options.format ?= off
  ck_options.autoescape ?= off
  ck_buffer = []

  ck_render_attrs = (obj) ->
    str = ''
    for k, v of obj
      str += " #{k}=\"#{ck_esc(v)}\""
    str

  ck_doctypes =
    '5': '<!DOCTYPE html>'
    'xml': '<?xml version="1.0" encoding="utf-8" ?>'
    'default': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
    'transitional': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
    'strict': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
    'frameset': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">'
    '1.1': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
    'basic': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">'
    'mobile': '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">'

  ck_self_closing = ['area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'link', 'meta', 'param']

  ck_esc = (txt) ->
    if ck_options.autoescape then h(txt) else String(txt)

  ck_tabs = 0

  ck_repeat = (string, count) -> Array(count + 1).join string

  ck_indent = -> text ck_repeat('  ', ck_tabs) if ck_options.format

  h = (txt) ->
    String(txt).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;')
    
  doctype = (type = 5) ->
    text ck_doctypes[type]
    text '\n' if ck_options.format<commit_msg>added support for CE-HTML doctype<commit_after>if window?
  coffeekup = window.CoffeeKup = {}
  coffee = if CoffeeScript? then CoffeeScript else null
else
  coffeekup = exports
  coffee = require 'coffee-script'

coffeekup.version = '0.2.3'

skeleton = (ck_options = {}) ->
  ck_options.context ?= {}
  ck_options.locals ?= {}
  ck_options.format ?= off
  ck_options.autoescape ?= off
  ck_buffer = []

  ck_render_attrs = (obj) ->
    str = ''
    for k, v of obj
      str += " #{k}=\"#{ck_esc(v)}\""
    str

  ck_doctypes =
    '5': '<!DOCTYPE html>'
    'xml': '<?xml version="1.0" encoding="utf-8" ?>'
    'default': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
    'transitional': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
    'strict': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
    'frameset': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">'
    '1.1': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
    'basic': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">'
    'mobile': '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">'
    'ce': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "ce-html-1.0-transitional.dtd">'

  ck_self_closing = ['area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'link', 'meta', 'param']

  ck_esc = (txt) ->
    if ck_options.autoescape then h(txt) else String(txt)

  ck_tabs = 0

  ck_repeat = (string, count) -> Array(count + 1).join string

  ck_indent = -> text ck_repeat('  ', ck_tabs) if ck_options.format

  h = (txt) ->
    String(txt).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;')
    
  doctype = (type = 5) ->
    text ck_doctypes[type]
    text '\n' if ck_options.format
{'fraction_non_alphanumeric': 0.21664712778429074, 'fraction_numerical': 0.0264947245017585, 'mean_word_length': 3.2574850299401197, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 2, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6303705', 'n_tokens_mistral': 1884, 'n_tokens_neox': 1695, 'n_words': 332}