feat(Markdown): add inline highlighting
This commit is contained in:
parent
2d5822dfa6
commit
972e05bac0
@ -19,6 +19,12 @@
|
|||||||
padding: 3px 5px
|
padding: 3px 5px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:not(pre) code {
|
||||||
|
padding: 2px 5px;
|
||||||
|
color: #d56161;
|
||||||
|
background: #f6f7f9;
|
||||||
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
border-left: 4px solid #ccc;
|
border-left: 4px solid #ccc;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import MarkdownIt from 'markdown-it';
|
import MarkdownIt from 'markdown-it';
|
||||||
import markdownItHighlightjs from 'markdown-it-highlightjs';
|
import markdownItHighlightjs from 'markdown-it-highlightjs';
|
||||||
import mermaidPlugin from './markdown-it-plugins/mermaidPlugin';
|
import mermaidPlugin from './markdown-it-plugins/mermaidPlugin';
|
||||||
|
import './highlight-theme/default.less';
|
||||||
|
import './highlight-theme/table.less';
|
||||||
|
|
||||||
const md = new MarkdownIt({
|
const md = new MarkdownIt({
|
||||||
html: true,
|
html: true,
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import './highlight-theme/default.less';
|
|
||||||
import './highlight-theme/table.less';
|
|
||||||
|
|
||||||
export async function parseMarkdown(text: string) {
|
export async function parseMarkdown(text: string) {
|
||||||
if (!text) {
|
if (!text) {
|
||||||
|
Loading…
Reference in New Issue
Block a user