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

Refactor and rename internal functions #46

Merged
merged 6 commits into from
May 24, 2021
Merged

Conversation

zkamvar
Copy link
Member

@zkamvar zkamvar commented May 21, 2021

This takes the unweildy and unhelpful pair of set_default_space() and char_to_nodelist() and renames them to make_text_nodes(), simplifying and refactoring much of the code along the way.

I realized that I could make the function simpler so that future me
could look at it and say "ah yes, that makes perfect sense" and now I
have... and I realize I might be able to make it _even simpler_
Copy link
Member

@maelle maelle left a comment

Choose a reason for hiding this comment

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

🚀

R/asis-nodes.R Outdated
fix_fully_inline(imath),
FUN = function(n) xml2::xml_ns_strip(xml2::xml_children(n))
)
new_nodes <- lapply(imath, fix_fully_inline)
Copy link
Member

Choose a reason for hiding this comment

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

given the package depends on purrr, should we use it here?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good point for consistency's sake!

R/asis-nodes.R Show resolved Hide resolved
@zkamvar zkamvar merged commit 461c81a into master May 24, 2021
@zkamvar zkamvar deleted the rename-internal-functions branch May 24, 2021 17:06
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.

None yet

2 participants