Skip to content

Commit

Permalink
Improve function name; convert for to for-of
Browse files Browse the repository at this point in the history
  • Loading branch information
start committed Aug 27, 2019
1 parent b264025 commit 4889f5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Implementation/Parsing/Inline/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function parseAndGetResult(
return tokenIndex + 1
}

function getChildren(args: { fromHereUntil: TokenRole }): InlineSyntaxNode[] {
function consumeChildren(args: { fromHereUntil: TokenRole }): InlineSyntaxNode[] {
const result = parseAndGetResult({
tokens: tokens.slice(countTokensParsed()),
until: args.fromHereUntil
Expand Down Expand Up @@ -98,7 +98,7 @@ function parseAndGetResult(
}

case LINK.startTokenRole: {
let children = getChildren({
let children = consumeChildren({
fromHereUntil: TokenRole.LinkEndAndUrl
})

Expand Down Expand Up @@ -142,7 +142,7 @@ function parseAndGetResult(
INLINE_QUOTE
]) {
if (token.role === richConvention.startTokenRole) {
const children = getChildren({
const children = consumeChildren({
fromHereUntil: richConvention.endTokenRole
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ class FootnoteBlockInserter {
getFootnoteBlock(footnotes: Footnote[]): FootnoteBlock {
const footnoteBlock = new FootnoteBlock(footnotes)

for (let i = 0; i < footnoteBlock.footnotes.length; i++) {
const footnote = footnoteBlock.footnotes[i]

for (const footnote of footnoteBlock.footnotes) {
const nestedFootnotes =
this.getOutermostFootnotesAndAssignTheirReferenceNumbers(footnote.children)

Expand Down

0 comments on commit 4889f5c

Please sign in to comment.