@hanzo/build 0.2.74 → 0.2.75
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/lib/reply.js +6 -7
- package/package.json +1 -1
package/lib/reply.js
CHANGED
|
@@ -28,14 +28,13 @@ const suffix = (s) => {
|
|
|
28
28
|
const dot = s.lastIndexOf('.');
|
|
29
29
|
return dot > 0 ? s.slice(dot + 1).toLowerCase() : '';
|
|
30
30
|
};
|
|
31
|
-
/** An info string is a file name (a dot, no spaces) or
|
|
31
|
+
/** An info string is a language, a file name (a dot, no spaces), or both (`html index.html`): the file name wins. */
|
|
32
32
|
const called = (info, n) => {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return `${word} block`;
|
|
33
|
+
const words = info.trim().split(/\s+/).filter(Boolean);
|
|
34
|
+
const file = words.find((w) => w.includes('.') && suffix(w));
|
|
35
|
+
if (file)
|
|
36
|
+
return file;
|
|
37
|
+
return words[0] ? `${words[0]} block` : `Block ${n}`;
|
|
39
38
|
};
|
|
40
39
|
/** Every fenced block in `text`, in order. */
|
|
41
40
|
export function artifacts(text) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/build",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.75",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"description": "Hanzo Build — say what you want, watch it built, deployed and running. The builder as a component, mounted by the Hanzo app at hanzo.ai.",
|