You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(generator): name the load-bearing newline rule and report an unscannable source
- Record why '\\n' is in REGEX_ALLOWED_AFTER: formatters emit a binary '/' at
end-of-line, so every line-leading '/' in blocks/*.ts is a real regex, including
the ones in table.ts and table_v2.ts. Removing it silently mis-scans those two.
- Split a scanner failure out of the spread-only 'ids: null' case. Both scans come
back empty for the same reason when blankStringsAndComments bails, so the mapper's
renames were dropped with no warning; it now reports a parseError and warns. The
spread case is unchanged, and its TSDoc no longer claims a cause that was false.
- Route every catalog sort through an exported compareCatalogNames so the ordering
test exercises the generator's comparator instead of re-deriving it, and match
localeCompare arguments whole so localeCompare() and a variable locale are caught.
- Note that downloadServableFileFromStorage guarantees a non-empty content type, so
the Vanta mimeType fallback chain reads as deliberately defensive.
Artifacts regenerate byte-identically and the generator warning set is unchanged.
@@ -1078,6 +1078,21 @@ export function extractBlockSuppliedParamIds(
1078
1078
blockContent: string,
1079
1079
blockName='block'
1080
1080
): BlockSuppliedParams{
1081
+
/**
1082
+
* A source the blanking scanner cannot get through — it ends inside an unterminated string,
1083
+
* template literal or comment — makes both scans below report "nothing found" for the same
1084
+
* reason. It is caught here so it is reported as a parse failure. Left to the branches below
1085
+
* it would be indistinguishable from a spread-only `subBlocks` array whose block has no
1086
+
* mapper, and the block's renames would be dropped without a word.
1087
+
*/
1088
+
if(blankStringsAndComments(blockContent)===null){
1089
+
return{
1090
+
ids: null,
1091
+
mapperIds: [],
1092
+
parseError: `${blockName}: source ends inside an unterminated string, template literal or comment, so neither its subBlocks array nor its params mapper could be read`,
0 commit comments