<commit_before><%# This template is used to generate a markdown file documenting facts. -%>
<%# Run 'ruby generate.rb > facts.md' to generate the markdown file. -%>
<%
  def format_fact_element(name, info, indent = '')
    subelements = (info['elements'] || {}).map{|n, i| format_fact_element(n, i, "#{indent}    ")}.join('')

    "#{indent}* `#{name}` (#{info['type']}) --- #{info['description']}\n#{subelements}"
  end
-%>
<% facts.each do |name, schema| -%>
### `<%= name %>`

<% if schema['hidden'] -%>
This legacy fact is hidden by default in Facter's command-line output.

<% end -%>
**Type:** <%= schema['type'] %>

**Purpose:**

<%= schema['description'] %>

<% if schema['elements'] -%>
**Elements:**

<%= schema['elements'].map{|name, info| format_fact_element(name, info)}.join('') %>
<% end -%>

<% if schema['resolution'] -%>
**Resolution:**

<%= schema['resolution'].split("\n").map { |line| "* " + line }.join("\n") %>
<% end -%>

<% if schema['caveats'] -%>
**Caveats:**

<%= schema['caveats'].split("\n").map { |line| "* " + line }.join("\n") %>
<% end -%>

([↑ Back to top](#page-nav))

<% end -%>
<commit_msg>(maint) Remove resolution and caveats from template.<commit_after><%# This template is used to generate a markdown file documenting facts. -%>
<%# Run 'ruby generate.rb > facts.md' to generate the markdown file. -%>
<%
  def format_fact_element(name, info, indent = '')
    subelements = (info['elements'] || {}).map{|n, i| format_fact_element(n, i, "#{indent}    ")}.join('')

    "#{indent}* `#{name}` (#{info['type']}) --- #{info['description']}\n#{subelements}"
  end
-%>
<% facts.each do |name, schema| -%>
### `<%= name %>`

<% if schema['hidden'] -%>
This legacy fact is hidden by default in Facter's command-line output.

<% end -%>
**Type:** <%= schema['type'] %>

**Purpose:**

<%= schema['description'] %>

<% if schema['elements'] -%>
**Elements:**

<%= schema['elements'].map{|name, info| format_fact_element(name, info)}.join('') %>
<% end -%>

<% end -%>

{'fraction_non_alphanumeric': 0.2652652652652653, 'fraction_numerical': 0.0, 'mean_word_length': 4.461748633879782, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, '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': '2058932', 'n_tokens_mistral': 752, 'n_tokens_neox': 700, 'n_words': 166}