<commit_before>import { expect } from 'chai'
import Up from '../../index'
import { DocumentNode } from '../../SyntaxNodes/DocumentNode'
import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
import { StressNode } from '../../SyntaxNodes/StressNode'
import { ParagraphNode } from '../../SyntaxNodes/ParagraphNode'
import { SectionSeparatorNode } from '../../SyntaxNodes/SectionSeparatorNode'
import { HeadingNode } from '../../SyntaxNodes/HeadingNode'
import { LineBlockNode } from '../../SyntaxNodes/LineBlockNode'
import { Line } from '../../SyntaxNodes/Line'


context("Indentation is important for many outline conventions. However, once the outline convention of a line has been determined, any leading whitespace is often ignored. This is true for:", () => {

  specify('Paragraphs', () => {
    expect(Up.toAst(" \t I'm just a normal guy who eats only when it's raining outside.")).to.be.eql(
      new DocumentNode([
        new ParagraphNode([
          new PlainTextNode("I'm just a normal guy who eats only when it's raining outside.")
        ])
      ]))
  })

  specify('Line blocks', () => {
    const text = `
 Roses are red
 Skeltals are white
\t If you stay here
You're in for a fright`

    expect(Up.toAst(text)).to.be.eql(
      new DocumentNode([
        new LineBlockNode([
          new Line([
            new PlainTextNode('Roses are red')
          ]),
          new Line([
            new PlainTextNode('Skeltals are white')
          ]),
          new Line([<commit_msg>Pass line block leading whitespace test<commit_after>import { expect } from 'chai'
import Up from '../../index'
import { DocumentNode } from '../../SyntaxNodes/DocumentNode'
import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
import { StressNode } from '../../SyntaxNodes/StressNode'
import { ParagraphNode } from '../../SyntaxNodes/ParagraphNode'
import { SectionSeparatorNode } from '../../SyntaxNodes/SectionSeparatorNode'
import { HeadingNode } from '../../SyntaxNodes/HeadingNode'
import { LineBlockNode } from '../../SyntaxNodes/LineBlockNode'
import { Line } from '../../SyntaxNodes/Line'


context("Indentation is important for many outline conventions. However, once the outline convention of a line has been determined, any leading whitespace is often ignored. This is true for:", () => {

  specify('Paragraphs', () => {
    expect(Up.toAst(" \t I'm just a normal guy who eats only when it's raining outside.")).to.be.eql(
      new DocumentNode([
        new ParagraphNode([
          new PlainTextNode("I'm just a normal guy who eats only when it's raining outside.")
        ])
      ]))
  })

  specify('Line blocks', () => {
    const text = `
  \t Roses are red
Skeltals are white
 \t  If you stay here
 You're in for a fright`

    expect(Up.toAst(text)).to.be.eql(
      new DocumentNode([
        new LineBlockNode([
          new Line([
            new PlainTextNode('Roses are red')
          ]),
          new Line([
            new PlainTextNode('Skeltals are white')
          ]),
          new Line([
{'fraction_non_alphanumeric': 0.13567674113009198, 'fraction_numerical': 0.0, 'mean_word_length': 2.7639060568603213, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3931967', 'n_tokens_mistral': 853, 'n_tokens_neox': 834, 'n_words': 283}