Migrating from services to dedicated API files

This commit is contained in:
2025-05-03 21:28:41 +02:00
parent e789025cd1
commit 043eab423f
22 changed files with 265 additions and 228 deletions

View File

@@ -1,6 +1,6 @@
import { visit } from 'unist-util-visit';
import { lookupFileByName, getFileUrl } from '../services/api';
import { MARKDOWN_REGEX } from '../types/markdown';
import { lookupFileByName, getFileUrl } from '../api/notes';
import { InlineContainerType, MARKDOWN_REGEX } from '../types/markdown';
import { Node } from 'unist';
import { Parent } from 'unist';
import { Text } from 'mdast';
@@ -146,16 +146,9 @@ function addMarkdownExtension(fileName: string): string {
* Determines if a node type can contain inline content
*/
function canContainInline(type: string): boolean {
return [
'paragraph',
'listItem',
'tableCell',
'blockquote',
'heading',
'emphasis',
'strong',
'delete',
].includes(type);
return Object.values(InlineContainerType).includes(
type as InlineContainerType
);
}
/**