mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 16:04:23 +00:00
Migrating from services to dedicated API files
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user