Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/plugins/markdown/data-source/markdown-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import {
$isTextNode,
} from 'lexical';
import { remark } from 'remark';
import remarkCjkFriendly from 'remark-cjk-friendly';
import remarkGfm from 'remark-gfm';
import remarkMath from 'remark-math';

import { DataSource } from '@/editor-kernel';
import type { IWriteOptions } from '@/editor-kernel/data-source';
Expand All @@ -33,6 +35,8 @@ export default class MarkdownDataSource extends DataSource {
private formatMarkdown(markdown: string): string {
try {
const result = remark()
.use(remarkCjkFriendly)
.use(remarkMath)
.use([[remarkGfm, { singleTilde: false }]])
.data('settings', {
bullet: '-',
Expand Down