Skip to content

Commit c51d792

Browse files
Version Packages (#154)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 2c67a6d commit c51d792

16 files changed

Lines changed: 92 additions & 66 deletions

.changeset/fix-block-boundary-expansion.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.changeset/fix-bold-and-br-rendering.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

.changeset/fix-colon-inline-directive.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

.changeset/unify-presigned-url-detection.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/notro-loader/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# notro-loader
22

3+
## 0.0.10
4+
5+
### Patch Changes
6+
7+
- [#153](https://github.com/mosugi/notro/pull/153) [`f26a4c4`](https://github.com/mosugi/notro/commit/f26a4c4c836c742dc2bc7e33d80c7bf39035c18d) Thanks [@mosugi](https://github.com/mosugi)! - Add `isNotionPresignedUrl()` helper and unify S3 presigned URL detection
8+
- Export `isNotionPresignedUrl(url)` as a single source of truth for detecting Notion S3 presigned URLs (covers `X-Amz-Algorithm` query param and `prod-files-secure.s3` hostname)
9+
- Use it in `isPresignedUrlExpired`'s fallback path, replacing the previous overly-broad hostname check
10+
- Fix `isPresignedUrlExpiredInMarkdown` to check **all** presigned URLs in markdown (was only checking the first), so articles with multiple images are correctly invalidated when any URL expires
11+
- Align URL extraction regex in `isPresignedUrlExpiredInMarkdown` with `markdownHasPresignedUrls` for consistency
12+
13+
- Updated dependencies [[`2c67a6d`](https://github.com/mosugi/notro/commit/2c67a6da5d406e42e4259a6be13baf3606eb1ef7), [`f26a4c4`](https://github.com/mosugi/notro/commit/f26a4c4c836c742dc2bc7e33d80c7bf39035c18d), [`f26a4c4`](https://github.com/mosugi/notro/commit/f26a4c4c836c742dc2bc7e33d80c7bf39035c18d)]:
14+
15+
316
## 0.0.9
417

518
### Patch Changes

packages/notro-loader/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "notro-loader",
33
"description": "A Content loader for Astro that uses the Notion Public API",
4-
"version": "0.0.9",
4+
"version": "0.0.10",
55
"type": "module",
66
"author": "mosugi <[email protected]>",
77
"license": "MIT",

packages/remark-nfm/CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# remark-notro
22

3+
## 0.0.9
4+
5+
### Patch Changes
6+
7+
- [#155](https://github.com/mosugi/notro/pull/155) [`2c67a6d`](https://github.com/mosugi/notro/commit/2c67a6da5d406e42e4259a6be13baf3606eb1ef7) Thanks [@mosugi](https://github.com/mosugi)! - Fix: Notion block boundaries now render as separate paragraphs
8+
9+
**Fix 13 (revised): Block boundary expansion (`\n``\n\n`)**
10+
Notion's Markdown API outputs each block (paragraph, heading, etc.) separated by a
11+
single `\n`. CommonMark treats a lone `\n` between text lines as a soft break,
12+
collapsing all consecutive blocks into one `<p>`. This fix expands every single `\n`
13+
between non-blank lines to `\n\n` so remark produces separate block-level elements,
14+
matching Notion's intended structure. Fenced code blocks and directive blocks (`:::`)
15+
are excluded from the expansion. `<br>` (intra-block Shift+Enter) is normalized to
16+
`<br/>` for correct rehype-raw handling.
17+
18+
- [#153](https://github.com/mosugi/notro/pull/153) [`f26a4c4`](https://github.com/mosugi/notro/commit/f26a4c4c836c742dc2bc7e33d80c7bf39035c18d) Thanks [@mosugi](https://github.com/mosugi)! - Fix: bold markers and line breaks now render correctly in Notion content
19+
20+
**Fix 13: `<br>` normalized to `<br/>`**
21+
Notion's Markdown API uses `<br>` (without slash) for inline line breaks
22+
(e.g. `月曜日<br>10:00~18:00`). Normalized to self-closing `<br/>` for
23+
correct inline rendering by rehype-raw.
24+
25+
**Fix 15: `**bold**`converted to`<strong>bold</strong>` in pre-processing**
26+
CommonMark delimiter run rules silently break `**bold**` rendering when `**`
27+
is adjacent to CJK close punctuation (e.g. `**『曜日時間固定』**` fails
28+
because `` is Unicode category Pf). The Notion API also sometimes outputs
29+
trailing spaces before the closing `**` (e.g. `**text **`). Pre-converting
30+
bold markers to `<strong>` tags bypasses both issues. Code spans and fenced
31+
code blocks are excluded from the conversion.
32+
33+
- [#153](https://github.com/mosugi/notro/pull/153) [`f26a4c4`](https://github.com/mosugi/notro/commit/f26a4c4c836c742dc2bc7e33d80c7bf39035c18d) Thanks [@mosugi](https://github.com/mosugi)! - Fix: colon in time formats (10:00, 18:30) no longer produces spurious `<div></div>` elements
34+
35+
`micromark-extension-directive` treats `:` (char code 58) as the trigger for
36+
inline text directives, so time formats like `10:00` were parsed as an inline
37+
directive named `00` (or `30` etc.), emitting an empty `<div>` element after the
38+
digit before the colon.
39+
40+
The fix restricts the directive micromark extension to flow-level constructs
41+
(container `:::callout` and leaf `::callout`) only, by removing the `text`
42+
property from the extension object before registering it. Notion content never
43+
uses inline text directives (`:name[...]`), so this change is safe and has no
44+
functional impact on Notion rendering.
45+
346
## 0.0.8
447

548
### Patch Changes

packages/remark-nfm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "remark-notro",
33
"description": "Remark plugin for Notion-flavored Markdown (NFM)",
4-
"version": "0.0.8",
4+
"version": "0.0.9",
55
"type": "module",
66
"author": "mosugi <[email protected]>",
77
"license": "MIT",

templates/blank/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# notro-blank
22

3+
## 0.0.10
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`f26a4c4`](https://github.com/mosugi/notro/commit/f26a4c4c836c742dc2bc7e33d80c7bf39035c18d)]:
8+
9+
310
## 0.0.9
411

512
### Patch Changes

templates/blank/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "notro-blank",
33
"type": "module",
4-
"version": "0.0.9",
4+
"version": "0.0.10",
55
"private": true,
66
"scripts": {
77
"dev": "astro dev",
@@ -16,7 +16,7 @@
1616
},
1717
"dependencies": {
1818
"astro": "^6.0.4",
19-
"notro-loader": "^0.0.9",
19+
"notro-loader": "^0.0.10",
2020
"zod": "^4.0.0"
2121
},
2222
"devDependencies": {

0 commit comments

Comments
 (0)