From 524030cd5f81a7717c7bdefaadfcb3e6f640db28 Mon Sep 17 00:00:00 2001 From: Hakula Chen Date: Sat, 5 Dec 2026 16:02:35 +0800 Subject: [PATCH 1/2] docs(rust): require closing quote on its own line in indoc macros --- plugins/hakula-languages/.claude-plugin/plugin.json | 2 +- plugins/hakula-languages/skills/rust/SKILL.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/hakula-languages/.claude-plugin/plugin.json b/plugins/hakula-languages/.claude-plugin/plugin.json index 3debe85..da93098 100644 --- a/plugins/hakula-languages/.claude-plugin/plugin.json +++ b/plugins/hakula-languages/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "hakula-languages", - "version": "1.1.6", + "version": "1.1.7", "description": "Nix, Nushell, and Rust conventions for coding agents", "author": { "name": "Hakula", "url": "https://hakula.xyz" }, "repository": "https://github.com/hakulab/plugins", diff --git a/plugins/hakula-languages/skills/rust/SKILL.md b/plugins/hakula-languages/skills/rust/SKILL.md index bb20eb8..5538fc8 100644 --- a/plugins/hakula-languages/skills/rust/SKILL.md +++ b/plugins/hakula-languages/skills/rust/SKILL.md @@ -37,7 +37,7 @@ Choose the narrowest visibility that serves supported callers. Use scoped visibi - **Raw literals**: use a raw string when its content would otherwise need escaping, with the fewest `#` delimiters that work. - **Multiline text**: when the project uses `indoc`, use `indoc!` for literals, `formatdoc!` for formatted text, and `writedoc!` with a writer to keep the content indented with its code. -- **Output lines**: in these macros, keep each output line on one source line, since reindenting a source continuation can change the de-indented text. A closing quote on its own line adds a final newline. +- **Output lines**: in these macros, keep each output line on one source line, since reindenting a source continuation can change the de-indented text. Always place the closing quote on its own line. When no final newline is wanted, strip the trailing newline with `.trim_end()`, `.strip_suffix('\n')`, or `pop()` on the resulting `String`. - **Captures**: capture format values inline by name, as in `{name}`. Bind an expression to a local named for its placeholder when it is not a plain identifier, so the template reads on its own. ## Dependencies From b4914f4666cb53553125f9cc883d5f8a3749c6ed Mon Sep 17 00:00:00 2001 From: Hakula Chen Date: Sat, 5 Dec 2026 16:06:25 +0800 Subject: [PATCH 2/2] docs(rust): simplify trailing-newline trimming guidance --- plugins/hakula-languages/skills/rust/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hakula-languages/skills/rust/SKILL.md b/plugins/hakula-languages/skills/rust/SKILL.md index 5538fc8..cfe89a2 100644 --- a/plugins/hakula-languages/skills/rust/SKILL.md +++ b/plugins/hakula-languages/skills/rust/SKILL.md @@ -37,7 +37,7 @@ Choose the narrowest visibility that serves supported callers. Use scoped visibi - **Raw literals**: use a raw string when its content would otherwise need escaping, with the fewest `#` delimiters that work. - **Multiline text**: when the project uses `indoc`, use `indoc!` for literals, `formatdoc!` for formatted text, and `writedoc!` with a writer to keep the content indented with its code. -- **Output lines**: in these macros, keep each output line on one source line, since reindenting a source continuation can change the de-indented text. Always place the closing quote on its own line. When no final newline is wanted, strip the trailing newline with `.trim_end()`, `.strip_suffix('\n')`, or `pop()` on the resulting `String`. +- **Output lines**: in these macros, keep each output line on one source line, since reindenting a source continuation can change the de-indented text. Always place the closing quote on its own line. When no final newline is wanted, trim it with `.trim_end()` (or `.strip_suffix('\n')` when trailing whitespace is significant). - **Captures**: capture format values inline by name, as in `{name}`. Bind an expression to a local named for its placeholder when it is not a plain identifier, so the template reads on its own. ## Dependencies