From 3e6c9917f6aab3de5fc6296b4916c15af313dc8e Mon Sep 17 00:00:00 2001 From: Duncan Mackenzie Date: Tue, 24 Nov 2026 09:09:22 -0800 Subject: [PATCH] Keep Snipsync marker examples from registering snippets Snipsync reads every file in this repo, including Markdown and config comments, and treats any line containing the literal start marker as a real snippet. The marker examples in README.md and CONTRIBUTING.md registered duplicate java-s3-driver-create and php-quickstart-worker snippets (the PHP one unterminated, so it captured to the end of README.md), and the prose in php-sandbox/README.md and phpstan.neon registered unterminated "..." snippets. Snipsync 1.14 warns about all of these. Render the examples as
 blocks that spell the first @ as @, with
placeholder names, and rephrase the prose so it no longer contains the marker.
---
 CONTRIBUTING.md                               | 15 ++++++++----
 README.md                                     | 23 ++++++++++++-------
 php-sandbox/README.md                         |  5 ++--
 .../client/temporal-client/phpstan.neon       |  5 ++--
 4 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 48c802f..f07755e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -48,12 +48,19 @@ snippet **name is the join key** — the docs repo has a ``
 `` placeholder in the target `.mdx` page, and Snipsync (run on the
 docs-repo side) copies the code across by matching names.
 
-```java
-// @@@SNIPSTART java-s3-driver-create
+
+
+
+// @@@SNIPSTART java-example-name
 S3AsyncClient s3Client = S3AsyncClient.builder().region(Region.US_EAST_2).build();
 ...
-// @@@SNIPEND
-```
+// @@@SNIPEND
+
Use `#` instead of `//` for Python and Ruby. Naming convention: `--`, e.g. `java-s3-driver-create` (see diff --git a/README.md b/README.md index ccfae2d..27ed9f9 100644 --- a/README.md +++ b/README.md @@ -141,22 +141,29 @@ docs. The `.mdx` page in the `documentation` repo has `` / ``, and Snipsync copies the code with the same name into it. -```java -// @@@SNIPSTART java-s3-driver-create + + +
+// @@@SNIPSTART java-example-name
 S3AsyncClient s3Client = S3AsyncClient.builder().region(Region.US_EAST_2).build();
-// @@@SNIPEND
-```
+// @@@SNIPEND
+
- Use `#` instead of `//` for Python and Ruby. - In PHP, Snipsync leaves out the marker line, and nothing can come before ` - + <?php // @@@SNIPSTART php-example-name ?> + <?php declare(strict_types=1); - ``` +
The closing `?>` swallows its newline, so the file prints nothing and `declare(strict_types=1)` still works. diff --git a/php-sandbox/README.md b/php-sandbox/README.md index d8f5a83..e49c5c0 100644 --- a/php-sandbox/README.md +++ b/php-sandbox/README.md @@ -411,6 +411,7 @@ best-practices/testing-suite/test.sh ## Snipsync markers -The PHP files start with `` followed by a second -`` first line, +followed by a second `` first line as "declare(strict_types) must be -# the very first statement", but PHP itself still enforces strict types there. +# first line, which holds the Snipsync start marker inside ``, as +# "declare(strict_types) must be the very first statement", but PHP itself +# still enforces strict types there. parameters: level: 5 paths: