Support ESS-style comment symbol ##' as well#27
Merged
TroyHernandez merged 2 commits intoJun 24, 2026
Conversation
PR cornball-ai#27 relaxed the doc-line regexes to ^##?' but left the two ^\\s*#' checks in the orphaned-block detector (parse.R:55,60) unchanged, so a stray ##' block bled into the next object instead of warning (the cornball-ai#18 regression, for double-hash comments). Extend those two checks and add test_parse.R coverage for ##' parsing and ##' orphan detection.
Collaborator
Author
|
Thanks for the follow-up, and merge! |
Contributor
|
Thanks for the PR! |
This file contains hidden or 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
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.
When one uses Emacs and ESS, it becomes second nature to use
##'as the dual#is different from#: the latter gets (by convention) indented to middle of the screen (for comments following a statement, typically) whereas##'stays flush.In fact, when one writes a simple function, say
and then asks for the documentation template (via
C-c C-o C-c, or via the menu, or via the function) then one gets(where one can question the wisdom of doing
@titleby tag and@detailand@descriptionby placement, but that is how they role; addiing @author is) which is clearly using##'. That used to stoptinyroxin its tracks.Following the PR if I invoke
trox.r(as I live on the command-line for these things) we getand life is good. I looked for the exising
^#'regular expressions (and variants) and made them^##?'which should allow for everything that was done before (when?acts as 'add zero instances of the preceding symbol' as well as the desired new feature demonstrated here (when?adds exactly one).