@futurelastic/colab-handbook 1.12.0-rc.32 → 1.12.0-rc.33
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
CHANGED
package/tools/lib/release-cut.js
CHANGED
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
const migrationPaths = require('./migration-paths');
|
|
68
68
|
const releaseTag = require('./release-tag');
|
|
69
|
+
const { stripCode } = require('./instruction-file');
|
|
69
70
|
|
|
70
71
|
const VERSION_RE = /^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/;
|
|
71
72
|
const BUMPS = Object.freeze(['patch', 'minor']);
|
|
@@ -664,11 +665,16 @@ const MARKER_RE = /<!--\s*colab:switch\b([\s\S]*?)-->/g;
|
|
|
664
665
|
* Returns { markers: [{ name, needs: [], role: null|'add'|'remove' }], malformed: [text] } — an
|
|
665
666
|
* unknown token, a bad name, `needs` on a child, or two markers for one name disagreeing are all
|
|
666
667
|
* `malformed`: "not cleared", reported, never defaulted.
|
|
668
|
+
*
|
|
669
|
+
* #466: fenced code blocks and inline code spans are blanked first (`stripCode`, the same reader
|
|
670
|
+
* the instruction-file import scan uses), so a body that QUOTES the marker family — prose such as
|
|
671
|
+
* "the `<!-- colab:switch -->` marker" — is documentation, not a malformed marker blocking every
|
|
672
|
+
* release. A real marker sits outside code, so it is still read, and still refused when malformed.
|
|
667
673
|
*/
|
|
668
674
|
function parseSwitchMarkers(body) {
|
|
669
675
|
const markers = [];
|
|
670
676
|
const malformed = [];
|
|
671
|
-
const text = String(body || '');
|
|
677
|
+
const text = stripCode(String(body || '')).join('\n');
|
|
672
678
|
let m;
|
|
673
679
|
MARKER_RE.lastIndex = 0;
|
|
674
680
|
while ((m = MARKER_RE.exec(text)) !== null) {
|