<commit_before>### Modified from <NAME>' Radiant:  https://github.com/vnijs/radiant

render_helpfile <- function(title, file)
{
  file <- paste0("shiny/help/", file)
  
  body <- markdown::markdownToHTML(file, fragment.only=TRUE, options=c(""))
  link <- paste0(title, "_help")
  thisyear <- format(Sys.Date(), "%Y")
  
  html <- sprintf("
    <div class='modal fade' id='%s' tabindex='-1' role='dialog' aria-labelledby='%s_label' aria-hidden='true'>
      <div class='modal-dialog'>
        <div class='modal-content'>
          <div class='modal-header'>
            <button type='button' class='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>&times;</span></button>
            <h4 class='modal-title' id='%s_label'>%s</h4>
          </div>
          <div class='modal-body'>%s<br>
            &copy;%s <NAME> and <NAME>.
            All documentation is released under a
              <a rel='license' href='http://creativecommons.org/licenses/by-sa/4.0/' target='_blank'>Creative Commons License</a>.
              <img alt='' style='border-width:0' src='cc.png'>
          </div>
        </div>
      </div>
    </div>
    <i title='Help' class='glyphicon glyphicon-question-sign' data-toggle='modal' data-target='#%s'></i>
     ", link, link, link, title, body, thisyear, link)
  <commit_msg>tweaked helpfile rendering<commit_after>### Modified from <NAME>' Radiant:  https://github.com/vnijs/radiant

render_helpfile <- function(title, file)
{
  file <- paste0("shiny/help/", file)
  
  body <- markdown::markdownToHTML(file, fragment.only=TRUE, options=c(""))
  link <- paste0(gsub(title, pattern=" ", replacement=""), "_help")
  thisyear <- format(Sys.Date(), "%Y")
  
  html <- sprintf("
    <div class='modal fade' id='%s' tabindex='-1' role='dialog' aria-labelledby='%s_label' aria-hidden='true'>
      <div class='modal-dialog'>
        <div class='modal-content'>
          <div class='modal-header'>
            <button type='button' class='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>&times;</span></button>
            <h4 class='modal-title' id='%s_label'>%s</h4>
          </div>
          <div class='modal-body'>%s<br>
            <font size='1'>
            &copy;%s <NAME> and <NAME>.
            All documentation is released under a
              <a rel='license' href='http://creativecommons.org/licenses/by-sa/4.0/' target='_blank'>Creative Commons License</a>.
              <img alt='' style='border-width:0' src='cc.png'>
            </font>
          </div>
        </div>
      </div>
    </div>
    <i title='Help' class='glyphicon glyphicon-question-sign' data-toggle='modal' data-target='#%s'></i>
     ", link, link, link, title, body, thisyear, link)
  
{'fraction_non_alphanumeric': 0.1946064139941691, 'fraction_numerical': 0.00619533527696793, 'mean_word_length': 2.9667630057803467, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 55, 'https://': 2, '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': '7120549', 'n_tokens_mistral': 918, 'n_tokens_neox': 893, 'n_words': 181}