Skip to content

Commit 7ad0cd0

Browse files
committed
feat: Export parseAbsoluteLink Individually
1 parent f5c67b0 commit 7ad0cd0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

deno.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"./browser": "./browser/mod.ts",
2929
"./browser/dom": "./browser/dom/mod.ts",
3030
"./browser/websocket": "./browser/websocket/mod.ts",
31+
"./parseAbsoluteLink": "./parseAbsoluteLink.ts",
3132
"./title": "./title.ts",
3233
"./text": "./text.ts"
3334
},

parseAbsoluteLink.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/** Parse `LinkNode` of [@progfay/scrapbox-parser](https://jsr.io/@progfay/scrapbox-parser) in detail
2+
*
3+
* @module
4+
*/
5+
16
import type { LinkNode } from "@progfay/scrapbox-parser";
27
import { parseYoutube } from "./parser/youtube.ts";
38
import { parseVimeo } from "./parser/vimeo.ts";
@@ -112,10 +117,10 @@ export const parseAbsoluteLink = (
112117
return { type: "absoluteLink", content, href, ...baseLink };
113118
};
114119

115-
type AudioURL = `${string}.${"mp3" | "ogg" | "wav" | "acc"}`;
120+
export type AudioURL = `${string}.${"mp3" | "ogg" | "wav" | "acc"}`;
116121
const isAudioURL = (url: string): url is AudioURL =>
117122
/\.(?:mp3|ogg|wav|aac)$/.test(url);
118123

119-
type VideoURL = `${string}.${"mp4" | "webm"}`;
124+
export type VideoURL = `${string}.${"mp4" | "webm"}`;
120125
const isVideoURL = (url: string): url is VideoURL =>
121126
/\.(?:mp4|webm)$/.test(url);

0 commit comments

Comments
 (0)