<commit_before>/**
 * A custom HTMX extension for doing things we need to do
 */
htmx.defineExtension('stencila', {
  onEvent : function(name, evt) {
    if (name === 'htmx:configRequest') {
      /**
       * This event is triggered after htmx has collected parameters for inclusion in the request.
       * It can be used to include or update the parameters that htmx will send.
       *
       * - Sets the `Accept` header so that we get HTML back from the API
       *   instead of JSON
       * 
       * - Sets the `X-CSRFToken` header.
       *   See https://docs.djangoproject.com/en/3.0/ref/csrf/#ajax
       * 
       * - Looks for the closest `stencila-template` attribute and sends it as `X-Template`
       *   Akin to https://github.com/bigskysoftware/htmx/blob/master/src/ext/client-side-templates.js<commit_msg>chore(JS):  Fix typo on comment<commit_after>/**
 * A custom HTMX extension for doing things we need to do
 */
htmx.defineExtension('stencila', {
  onEvent : function(name, evt) {
    if (name === 'htmx:configRequest') {
      /**
       * This event is triggered after htmx has collected parameters for inclusion in the request.
       * It can be used to include or update the parameters that htmx will send.
       *
       * - Sets the `Accept` header so that we get HTML back from the API
       *   instead of JSON
       * 
       * - Sets the `X-CSRFToken` header.
       *   See https://docs.djangoproject.com/en/3.0/ref/csrf/#ajax
       * 
       * - Looks for the closest `hx-template` attribute and sends it as `X-Template`
       *   Akin to https://github.com/bigskysoftware/htmx/blob/master/src/ext/client-side-templates.js
{'fraction_non_alphanumeric': 0.10504201680672269, 'fraction_numerical': 0.0024009603841536613, 'mean_word_length': 2.4442148760330578, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3131151', 'n_tokens_mistral': 508, 'n_tokens_neox': 501, 'n_words': 169}