Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(parser/renderer): support inline footnotes #183

Merged

Conversation

xcoulon
Copy link
Member

@xcoulon xcoulon commented Sep 15, 2018

support for footnote and footnoteref macros

also, rename Content to Elements in Section type.

Fixes #139

Signed-off-by: Xavier Coulon [email protected]

support for `footnote` and `footnoteref` macros

also, rename `Content` to `Elements` in `Section` type.

Fixes bytesparadise#139

Signed-off-by: Xavier Coulon <[email protected]>
}
c := types.NewFootnotesCollector()
// when
content.Accept(c)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error return value of content.Accept is not checked

}
c := types.NewFootnotesCollector()
// when
content.Accept(c)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error return value of content.Accept is not checked

xrefsCollector := NewElementReferencesCollector()
for _, e := range elements {
if v, ok := e.(Visitable); ok {
v.Accept(xrefsCollector)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error return value of v.Accept is not checked

if v, ok := e.(Visitable); ok {
v.Accept(c)
v.Accept(footnotesCollector)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error return value of v.Accept is not checked

@xcoulon xcoulon merged commit 71300a7 into bytesparadise:master Sep 15, 2018
@xcoulon xcoulon deleted the Issue139_support_inline_footnotes branch September 15, 2018 13:29
xcoulon added a commit that referenced this pull request Sep 15, 2018
support for `footnote` and `footnoteref` macros
also, rename `Content` to `Elements` in `Section` type.

Fixes #138

Signed-off-by: Xavier Coulon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants