<commit_before>const { lineBreak } = require('./helpers')

module.exports = (changes, changeIndex, config) => {
  const nextLine = changes[changeIndex + 1]
  if (!nextLine) return false

  const keywords = Array.isArray(config.bodyKeyword) ? config.bodyKeyword : [config.bodyKeyword]
  const BODY_REG = new RegExp(`.+()\\s(?<keyword>${keywords.join('|')})\\s(?<body>.*)`)
  const matches = BODY_REG.exec(nextLine.content)
  if (!matches) return false

  const { body } = matches.groups
  return lineBreak(body)
}<commit_msg>Allow for : characters following body keywords<commit_after>const { lineBreak } = require('./helpers')

module.exports = (changes, changeIndex, config) => {
  const nextLine = changes[changeIndex + 1]
  if (!nextLine) return false

  const keywords = Array.isArray(config.bodyKeyword) ? config.bodyKeyword : [config.bodyKeyword]
  const BODY_REG = new RegExp(`.+()\\s(?<keyword>${keywords.join('|')}):?\\s(?<body>.*)`)
  const matches = BODY_REG.exec(nextLine.content)
  if (!matches) return false

  const { body } = matches.groups
  return lineBreak(body)
}
{'fraction_non_alphanumeric': 0.16528162511542013, 'fraction_numerical': 0.0018467220683287165, 'mean_word_length': 4.923497267759563, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '6785963', 'n_tokens_mistral': 353, 'n_tokens_neox': 345, 'n_words': 77}