Add support for subshell functions#78
Closed
jbrubake wants to merge 23 commits intoreconquest:masterfrom
Closed
Conversation
Use the actual header name (do not remove underscores)
Trelor
reviewed
Feb 5, 2025
| # - `function_name () {` | ||
| # - `function_name {` | ||
| /^[[:blank:]]*(function[[:blank:]]+)?([a-zA-Z0-9_\-:-\\.]+)[[:blank:]]*(\([[:blank:]]*\))?[[:blank:]]*\{/ \ | ||
| /^[[:blank:]]*(function[[:blank:]]+)?([a-zA-Z0-9_\-:-\\.]+)[[:blank:]]*(\([[:blank:]]*\))?[[:blank:]]*[({]/ \ |
There was a problem hiding this comment.
We don't need to escape it?
/^[[:blank:]]*(function[[:blank:]]+)?([a-zA-Z0-9_\-:-\\.]+)[[:blank:]]*(\([[:blank:]]*\))?[[:blank:]]*[\{\(]/ \
Author
There was a problem hiding this comment.
Quote the { and (? No, it's a bracket expression so they are treated literally. You can quote them if using gawk but I don't think that works as expected if using another awk
Fix underscores in github markdown links
- Choose header level used for functions depending on section nesting: - h2 for top-level - h3 for functions contained in sections - sections themselves are h2 - sub-sections coming from annotations will be one level deeper than the corresponding function - Introduce `@endsection` to leave active section nesting again. - `@section` blocks now support `@see`, `@set` and `@example` - `@section` blocks also appear in TOC, contained functions will be nested in TOC as well - Sections are not bound to process_function/render_docblock anymore. They can also be used when there is no more function following after them. All that's needed is one none-comment line afterwards. - added some tests to verify the new behavior Bugfix: Reset variable "description" whenever its value was assigned (and thus consumed) to a `@section` or `@file` block to prevent it from being inherited/used by the next function as well.
Rework and enhance `@section` - Choose header level used for functions depending on section nesting: - h2 for top-level - h3 for functions contained in sections - sections themselves are h2 - sub-sections coming from annotations will be one level deeper than the corresponding function - Introduce `@endsection` to leave active section nesting again. - `@section` blocks now support `@see`, `@set` and `@example` - `@section` blocks also appear in TOC, contained functions will be nested in TOC as well - Sections are not bound to process_function/render_docblock anymore. They can also be used when there is no more function following after them. All that's needed is one none-comment line afterwards. - added some tests to verify the new behavior Bugfix: Reset variable "description" whenever its value was assigned (and thus consumed) to a `@section` or `@file` block to prevent it from being inherited/used by the next function as well.
allow to mark entire sections as `@internal`
* introduce literal blocks (no space trimming) * Create md-literal-lines.test.sh * Update README.md
Functions in the form `func () ( ... )` are documented just like
the more common `{}` version.
353628a to
cde2263
Compare
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.
Functions in the form
func () ( ... )are documented just like the more common{}version.