Skip to content

Commit

Permalink
Contextに番号付き箇条書き用の情報を定義
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Feb 14, 2020
1 parent 06cec3a commit ee24c59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/easybooks-ast/review-stringify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ interface Context {
list: number
id: number
chapter: string
index?: number
ordered?: boolean
}

const getId = (context: Context) => {
Expand Down Expand Up @@ -74,7 +76,7 @@ const list = (tree: EBAST.List, context: Context) => {
.map((child, index) => compiler(child, {
...context,
list: context.list + 1,
ordered: tree.ordered,
ordered: tree.ordered || false,
index: index + 1
}))
.join('') + '\n'
Expand Down

0 comments on commit ee24c59

Please sign in to comment.