<commit_before>
//- ----------------------------------------------------------------------------
//- utils
//- ----------------------------------------------------------------------------

mixin _proxy(elementTag, id, attrs, elementType, elementClass, attrsExtender, data, content)
  -function defaultExtender() {
  -  if(elementClass === "fgFieldWrapper") {
  -    return { "class" : "fgFieldWrapper" };
  -  } else if(elementClass === "fgFieldLabel") {
  -    return { "class" : "fgFieldLabel" };
  -  } else if(elementClass === "fgMultiEntry") {
  -    return { "class" : "fgMultiEntry" };
  -  } else if(elementClass === "fgEntryLabel") {
  -    return { "class" : "fgEntryLabel" };
  -  } else if(elementClass === "fgEntryName") {
  -    return { "class" : "fgEntryName" };
  -  } else if(elementClass === "fgField") {
  -    return { "class" : "fgField" };
  -  } else if(elementClass === "fgEntry") {
  -    return { "class" : "fgEntry" };
  -  } else {
  -    return {};
  -  }
  -}
  -function extAttrs() {
  -  var res = (typeof attrsExtender === "function") ? attrsExtender(elementTag, elementType, elementClass) : {};
  -  return res ? res : {};
  -}
  -var elemSel = id + "::attributes"
  -var insertedAttrs = (data && data[elemSel]) ? data[elemSel] : {}
  -if(content === false)
    #{elementTag}(id=id)&attributes(attrs, defaultExtender(), extAttrs(), insertedAttrs)
  -else if(content)
    #{elementTag}(id=id)&attributes(attrs, defaultExtender(), extAttrs(), insertedAttrs) #{content}
  -else
    #{elementTag}(id=id)&attributes(attrs, defaultExtender(), extAttrs(), insertedAttrs)
      block
<commit_msg>Remove redundant checks in defaultExtender.<commit_after>
//- ----------------------------------------------------------------------------
//- utils
//- ----------------------------------------------------------------------------

mixin _proxy(elementTag, id, attrs, elementType, elementClass, attrsExtender, data, content)
  -function defaultExtender() {
  -  if(elementClass) {
  -    return { "class" : elementClass };
  -  } else {
  -    return {};
  -  }
  -}
  -function extAttrs() {
  -  var res = (typeof attrsExtender === "function") ? attrsExtender(elementTag, elementType, elementClass) : {};
  -  return res ? res : {};
  -}
  -var elemSel = id + "::attributes"
  -var insertedAttrs = (data && data[elemSel]) ? data[elemSel] : {}
  -if(content === false)
    #{elementTag}(id=id)&attributes(attrs, defaultExtender(), extAttrs(), insertedAttrs)
  -else if(content)
    #{elementTag}(id=id)&attributes(attrs, defaultExtender(), extAttrs(), insertedAttrs) #{content}
  -else
    #{elementTag}(id=id)&attributes(attrs, defaultExtender(), extAttrs(), insertedAttrs)
      block

{'fraction_non_alphanumeric': 0.27464008859357697, 'fraction_numerical': 0.0, 'mean_word_length': 2.2650602409638556, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5127171', 'n_tokens_mistral': 817, 'n_tokens_neox': 824, 'n_words': 161}