Skip to content

Commit 0562c74

Browse files
committed
✨ Add the Anchor node
1 parent 6cc4df7 commit 0562c74

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

node/anchor.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Unit } from "./unit.ts";
2+
import { PlainText } from "./plainText.ts";
3+
4+
/** Anchor埋め込み */
5+
export interface Anchor {
6+
type: "anchor";
7+
8+
/** 構文解析結果 */
9+
unit: AnchorUnit;
10+
11+
/** the same as `unit.content` */
12+
children: PlainText;
13+
}
14+
15+
export interface AnchorUnit extends Unit {
16+
/** Anchor video ID */
17+
videoId: string;
18+
}

node/node.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { Vimeo } from "./vimeo.ts";
1919
import { Audio } from "./audio.ts";
2020
import { AudioLink } from "./audioLink.ts";
2121
import { Spotify } from "./spotify.ts";
22+
import { Anchor } from "./anchor.ts";
2223
import { GoogleMap } from "./googleMap.ts";
2324
import { Indent } from "./indent.ts";
2425

@@ -47,6 +48,7 @@ export type NodeWithoutIndent =
4748
| Audio
4849
| AudioLink
4950
| Spotify
51+
| Anchor
5052
| Youtube
5153
| Vimeo
5254
| GoogleMap;

0 commit comments

Comments
 (0)