-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add new R pipe support #127
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
db888be
Add new R pipe support
cderv c4f245b
Add NEWS bullet
cderv 0fe0a94
withr is not in suggest yet.
cderv b414850
check highlight of 2 pipes in one step
cderv 6234c10
Add support for placeholder in R pipe syntax
cderv bd6b346
use snapshot test instead of writing long HTML line in R file
cderv 094bae3
Leave out PIPEBIND test
cderv 2259b07
associate PIPE with special instead of infix
cderv 174586b
Merge commit '8434f36734d1dfca434cbe86ba1facb9da99df92'
cderv a43735d
withr is not needed anymore
cderv c4d4894
Treat PLACEHOLDER as SYMBOL and set dsVariable class
cderv c37e45a
Do the transformatin in `token_type()` directly
cderv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
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.
Sorry, I meant you should do the transformation in this function, so we only need to do it in one place.
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.
Oh ok. I was under the impression you did associate some token classes from R parsed data to some chroma or pandoc classes directly. So I went with that for this one too as
token_type()
seemed to handle special grouping of some token type ininfix
,special
,constant
andparens
groups.I'll adapt
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.
Did the change, hopefully I got it right. I did not went with that originally because you went with separate attributions for other types by duplicating
downlit/R/highlight.R
Lines 228 to 230 in 8434f36
downlit/R/highlight.R
Lines 254 to 256 in 8434f36
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.
Oh yeah, that's reasonable read — I think this is different because
PLACEHOLDER
is only a single token so it makes more sense to lump it into one of the other classes.