ovr 7.0.0-next.32 → 7.0.0-next.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/CHANGELOG.md +6 -0
- package/dist/markdown/index.d.ts.map +1 -1
- package/dist/markdown/index.js +8 -4
- package/package.json +1 -1
- package/src/markdown/index.ts +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# ovr
|
|
2
2
|
|
|
3
|
+
## 7.0.0-next.33
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c5defc5: `Markdown.raw(markdown, html)` with one line of source stays in its line, such as a separator only agents read, `Markdown.raw(" · ", "")`, inside a list item. It was always its own block, which broke the line apart anywhere but a paragraph. Source of several lines, or whose HTML starts with a block element, is still its own block.
|
|
8
|
+
|
|
3
9
|
## 7.0.0-next.32
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAEN,KAAK,MAAM,EAKX,MAAM,oBAAoB,CAAC;AAyC5B,kFAAkF;AAClF,eAAO,MAAM,KAAK,eAAkB,CAAC;AAErC,yBAAiB,QAAQ,CAAC;IACzB,kCAAkC;IAClC,KAAY,OAAO,GAAG;QACrB,wEAAwE;QACxE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,CAAC;QAEzC;;;;;;;;;;;;WAYG;QACH,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,EACd,CAAC,CACD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,GAAG,KAET;YACA,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA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C,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,+CAE7D;IAED;;;;;;OAMG;IACH,OAAa,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,mBAcnE;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC,KAAK,CAEzD;CACD"}
|
package/dist/markdown/index.js
CHANGED
|
@@ -133,7 +133,12 @@ class Writer {
|
|
|
133
133
|
this.#close(chunk.name);
|
|
134
134
|
}
|
|
135
135
|
else if (chunk instanceof Source)
|
|
136
|
-
this.#raw(chunk.markdown,
|
|
136
|
+
this.#raw(chunk.markdown,
|
|
137
|
+
// its own block when it is written as one, or stands for one. A
|
|
138
|
+
// line for a line, such as a separator only agents read, stays
|
|
139
|
+
// in its sentence
|
|
140
|
+
/\n/.test(chunk.markdown.trim()) ||
|
|
141
|
+
Writer.#rawBlock.test(String(chunk.value)));
|
|
137
142
|
else if (chunk.raw)
|
|
138
143
|
this.#raw(chunk.value);
|
|
139
144
|
else
|
|
@@ -158,11 +163,10 @@ class Writer {
|
|
|
158
163
|
}
|
|
159
164
|
/**
|
|
160
165
|
* Raw HTML, such as from `Markup.raw`, is valid Markdown, so it is
|
|
161
|
-
* written as it is, as is Markdown source from `Markdown.raw
|
|
162
|
-
* always its own block.
|
|
166
|
+
* written as it is, as is Markdown source from `Markdown.raw`.
|
|
163
167
|
*
|
|
164
168
|
* @param html HTML, or Markdown source
|
|
165
|
-
* @param source The text is Markdown source
|
|
169
|
+
* @param source The text is Markdown source that is its own block
|
|
166
170
|
*/
|
|
167
171
|
#raw(html, source) {
|
|
168
172
|
if (!html || this.#skipping)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ovr",
|
|
3
3
|
"description": "Web apps anyone can use. Each route serves people a page and agents Markdown and MCP tools, with forms, Postgres, and passkey sign-in built in.",
|
|
4
|
-
"version": "7.0.0-next.
|
|
4
|
+
"version": "7.0.0-next.33",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
package/src/markdown/index.ts
CHANGED
|
@@ -228,7 +228,15 @@ class Writer {
|
|
|
228
228
|
// it ends, so they share one empty set, which is never changed
|
|
229
229
|
this.#open(chunk.name, attrs ?? Writer.#none);
|
|
230
230
|
if (chunk.closed) this.#close(chunk.name);
|
|
231
|
-
} else if (chunk instanceof Source)
|
|
231
|
+
} else if (chunk instanceof Source)
|
|
232
|
+
this.#raw(
|
|
233
|
+
chunk.markdown,
|
|
234
|
+
// its own block when it is written as one, or stands for one. A
|
|
235
|
+
// line for a line, such as a separator only agents read, stays
|
|
236
|
+
// in its sentence
|
|
237
|
+
/\n/.test(chunk.markdown.trim()) ||
|
|
238
|
+
Writer.#rawBlock.test(String(chunk.value)),
|
|
239
|
+
);
|
|
232
240
|
else if (chunk.raw) this.#raw(chunk.value);
|
|
233
241
|
else this.#text(chunk.value);
|
|
234
242
|
}
|
|
@@ -252,11 +260,10 @@ class Writer {
|
|
|
252
260
|
|
|
253
261
|
/**
|
|
254
262
|
* Raw HTML, such as from `Markup.raw`, is valid Markdown, so it is
|
|
255
|
-
* written as it is, as is Markdown source from `Markdown.raw
|
|
256
|
-
* always its own block.
|
|
263
|
+
* written as it is, as is Markdown source from `Markdown.raw`.
|
|
257
264
|
*
|
|
258
265
|
* @param html HTML, or Markdown source
|
|
259
|
-
* @param source The text is Markdown source
|
|
266
|
+
* @param source The text is Markdown source that is its own block
|
|
260
267
|
*/
|
|
261
268
|
#raw(html: string, source?: boolean) {
|
|
262
269
|
if (!html || this.#skipping) return;
|