-
Notifications
You must be signed in to change notification settings - Fork 235
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
Use new warn_roxy_tag() and warn_roxy_block() #1317
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensure that markdown always checks for matched `{`
* Now get roxy_generated_tag() helper that takes a block * All tags must now have file and line * File name resolution happens in rd_section_reexport() so we can use consistent warnings (always mentioning the tag) * Final use of roxy_warning() removed, so inline into export roxy_tag_warning()
gaborcsardi
approved these changes
Apr 6, 2022
Looks great! Not only are the warnings better, the code that generates them is simpler as well. Left some comments, mostly cosmetics. |
gaborcsardi
reviewed
Apr 6, 2022
R/markdown.R
Outdated
roxy_tag_warning(tag, "Unknown xml node: ", xml_name(xml)) | ||
warn_roxy_tag(tag, c( | ||
"markdown translation failed", | ||
x = "Internal error: unknown xml node {xml_name(xml)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could be more helpful here as well, maybe suggest opening an issue?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These new functions are powered by cli, given considerably better displays.
A few things to note:
markdown()
now checks for incomplete braces; I think this is ok. Certainly it seems inconsistent to only check it for sectioned md, which is what we were doing before.try_find_topic_in_package()
.warn(parent = err)
makes it so much easier to forward on the underlying problem.To do: