diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-21 04:55:41 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-21 04:55:41 +0800 |
| commit | 2097238b57810d78989d3ecab8bc97ce1b8a6aa1 (patch) | |
| tree | ba2d175e8aad5e8f7311cba4e1cf719bd2a7ca64 | |
| parent | 844c3c9029f75f37622413f3e3a92b93664852ed (diff) | |
fix: detect both opening and closing bracket forms for attribute macro
patterns
| -rw-r--r-- | CHANGELOG.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 962d048..9982cc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,7 +54,14 @@ None #### Fixes: -None +1. **[`pathf:patterns`]** Fixed pattern detection logic in `mingling_pathf` for multiple patterns to correctly detect opening bracket forms (e.g., `[chain`, `[renderer`, `[help`, `[completion`) in addition to the previously supported closing bracket forms (e.g., `chain]`, `renderer]`, `help]`, `completion]`). This ensures that attribute macro usages like `#[chain]`, `#[renderer]`, `#[help]`, and `#[completion]` are properly detected regardless of which side of the attribute the pattern matcher examines. + + - **`ChainPattern`**: Changed `content.contains("chain]")` → `content.contains("[chain") || content.contains("chain]")` + - **`RendererPattern`**: Changed `content.contains("renderer]")` → `content.contains("[renderer") || content.contains("renderer]")` + - **`HelpPattern`**: Changed `content.contains("help]")` → `content.contains("[help") || content.contains("help]")` + - **`CompletionPattern`**: Changed `content.contains("completion(")` → `content.contains("completion(") || content.contains("[completion")` + +2. **[`pathf:patterns`]** Updated `PackPattern` detection to recognize `pack_structural!` and `pack_err_structural!` macros, which were previously missed by the pattern matcher. The `contains` method now checks for these additional macro names alongside the existing `pack!` and `pack_err!` checks. #### Optimizations: |
