Skip to content

Commit

Permalink
Use existing type for signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
start committed Oct 12, 2020
1 parent 1c45816 commit e4d925a
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/Implementation/Parsing/Outline/getOutlineSyntaxNodes.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { last } from '../../CollectionHelpers'
import { NormalizedSettings } from '../../NormalizedSettings'
import { NON_BLANK_PATTERN } from '../../Patterns'
import { OutlineSyntaxNode } from '../../SyntaxNodes/OutlineSyntaxNode'
import { ThematicBreak } from '../../SyntaxNodes/ThematicBreak'
import { HeadingLeveler } from './HeadingLeveler'
import { LineConsumer } from './LineConsumer'
import { parseParagraphOrLineBlock } from './parseParagraphOrLineBlock'
import { tryToParseBlankLineSeparation } from './tryToParseBlankLineSeparation'
Expand All @@ -16,7 +14,7 @@ import { tryToParseNumberedList } from './tryToParseNumberedList'
import { tryToParseRevealableBlock } from './tryToParseRevealableBlock'
import { tryToParseTable } from './tryToParseTable'
import { tryToParseThematicBreakStreak } from './tryToParseThematicBreakStreak'

import { OutlineParser } from './OutlineParser'


// This includes every outline convention.
Expand All @@ -35,14 +33,7 @@ const OUTLINE_CONVENTION_PARSERS = [
]


export function getOutlineSyntaxNodes(
args: {
markupLines: string[],
sourceLineNumber: number,
headingLeveler: HeadingLeveler,
settings: NormalizedSettings.Parsing
}
): OutlineSyntaxNode[] {
export function getOutlineSyntaxNodes(args: OutlineParser.Args): OutlineSyntaxNode[] {
const { markupLines, headingLeveler, settings } = args

// Alright! Our first task is to strip away any leading and trailing lines that
Expand Down Expand Up @@ -83,7 +74,7 @@ export function getOutlineSyntaxNodes(
const sourceLineNumber =
initialSourceLineNumber + markupLineConsumer.countLinesConsumed()

const outlineParserArgs = {
const outlineParserArgs: OutlineParser.Args = {
markupLines: markupLineConsumer.remaining(),
sourceLineNumber,
headingLeveler,
Expand Down

0 comments on commit e4d925a

Please sign in to comment.