<commit_before>// @flow

const AstNode = require('../../../ast-node.js')
const AstNodeList = require('../../../ast-node-list.js')
const OpenTagTracker = require('../../helpers/open-tag-tracker.js')
const parseHtmlTag = require('../../helpers/parse-html-tag.js')

module.exports = function transformATag (
  node: Object,
  openTags: OpenTagTracker,
  file: string,
  line: number
): AstNodeList {
  const result = new AstNodeList()
  const [tag, attributes] = parseHtmlTag(node.content, file, line)
  const resultNode = new AstNode({
    type: 'linebreak',
    tag,
    file,
    line,
    content: '',
    attributes
  })
  openTags.add(resultNode)
  result.pushData(resultNode)
  return result
}<commit_msg>Don't store BR tags as open (#431)<commit_after>// @flow

const AstNode = require('../../../ast-node.js')
const AstNodeList = require('../../../ast-node-list.js')
const OpenTagTracker = require('../../helpers/open-tag-tracker.js')
const parseHtmlTag = require('../../helpers/parse-html-tag.js')

module.exports = function transformATag (
  node: Object,
  openTags: OpenTagTracker,
  file: string,
  line: number
): AstNodeList {
  const result = new AstNodeList()
  const [tag, attributes] = parseHtmlTag(node.content, file, line)
  const resultNode = new AstNode({
    type: 'linebreak',
    tag,
    file,
    line,
    content: '',
    attributes
  })
  result.pushData(resultNode)
  return result
}
{'fraction_non_alphanumeric': 0.16643059490084985, 'fraction_numerical': 0.002124645892351275, 'mean_word_length': 3.3476923076923075, 'pattern_counts': {'":': 0, '<': 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': '1791645', 'n_tokens_mistral': 454, 'n_tokens_neox': 451, 'n_words': 107}