refactor(editor): extensionalize notion html adapter (#9318)

Part of [BS-2212](https://linear.app/affine-design/issue/BS-2212/adapter-extension化修复)
This commit is contained in:
donteatfriedrice
2024-12-26 03:22:09 +00:00
parent 3064f21454
commit 3996f96368
16 changed files with 158 additions and 125 deletions
@@ -2,12 +2,12 @@ import type { ExtensionType } from '@blocksuite/block-std';
import { EmbedGithubBlockHtmlAdapterExtension } from './html.js';
import { EmbedGithubMarkdownAdapterExtension } from './markdown.js';
import { EmbedGithubNotionHtmlAdapterExtension } from './notion-html.js';
import { EmbedGithubBlockNotionHtmlAdapterExtension } from './notion-html.js';
import { EmbedGithubBlockPlainTextAdapterExtension } from './plain-text.js';
export const EmbedGithubBlockAdapterExtensions: ExtensionType[] = [
EmbedGithubBlockHtmlAdapterExtension,
EmbedGithubMarkdownAdapterExtension,
EmbedGithubBlockPlainTextAdapterExtension,
EmbedGithubNotionHtmlAdapterExtension,
EmbedGithubBlockNotionHtmlAdapterExtension,
];
@@ -10,5 +10,5 @@ export const embedGithubBlockNotionHtmlAdapterMatcher =
githubUrlRegex
);
export const EmbedGithubNotionHtmlAdapterExtension =
export const EmbedGithubBlockNotionHtmlAdapterExtension =
BlockNotionHtmlAdapterExtension(embedGithubBlockNotionHtmlAdapterMatcher);