create-cadmo 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/spec-drift.mjs +4 -3
package/package.json
CHANGED
package/templates/spec-drift.mjs
CHANGED
|
@@ -194,9 +194,10 @@ for (const f of mdFiles(ROOT)) {
|
|
|
194
194
|
const rel = path.relative(ROOT, f).split(BS).join('/');
|
|
195
195
|
if (watches) {
|
|
196
196
|
specs.push({ spec: rel, watches, reviewed: reviewedOf(text) });
|
|
197
|
-
} else if (text.startsWith('<!--') && /^watches:/m.test(text)) {
|
|
198
|
-
//
|
|
199
|
-
//
|
|
197
|
+
} else if (text.startsWith('<!--') && /^watches:/m.test(text.replace(/^<!--[^]*?-->/, ''))) {
|
|
198
|
+
// front matter placed AFTER a leading HTML comment is invisible to the
|
|
199
|
+
// grammar — a spec that LOOKS guarded but isn't. (A watches: example still
|
|
200
|
+
// INSIDE the comment — the untouched template — stays silent.)
|
|
200
201
|
console.error(`WARNING: ${rel} has a watches: line but does not start with --- (front matter must be the very first bytes — delete the leading comment). This spec is NOT being checked.`);
|
|
201
202
|
}
|
|
202
203
|
}
|