fix: use the global format default for C file comments #847
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.
Describe the problem being solved
When users set a default format choice with the
--markup=
option, comments from a C file do not inherit that default.This means that even if I use
--markup=markdown
, the C comments would be parsed as if they were "rdoc".How is this problem solved?
This changeset sets the default markup format for C comments to the global option when they're created during parsing. I've added test coverage for the previous behavior and the new behavior.
Anything else reviewers should note?
Note that RDoc::Markup::PreProcess will apply any comment-local
:markup:
directives in the#handle
method, and override this default as necessary.