mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
Add highlighting
This commit is contained in:
parent
bb8e4f26ee
commit
80bcddd4df
4 changed files with 1547 additions and 1453 deletions
|
@ -73,14 +73,15 @@
|
|||
"lemmy-js-client": "^0.19.0-rc.13",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"markdown-it": "^13.0.1",
|
||||
"markdown-it-bidi": "^0.1.0",
|
||||
"markdown-it-container": "^3.0.0",
|
||||
"markdown-it-emoji": "^2.0.2",
|
||||
"markdown-it-footnote": "^3.0.3",
|
||||
"markdown-it-highlightjs": "^4.0.1",
|
||||
"markdown-it-html5-embed": "^1.0.0",
|
||||
"markdown-it-ruby": "^0.1.1",
|
||||
"markdown-it-sub": "^1.0.0",
|
||||
"markdown-it-sup": "^1.0.0",
|
||||
"markdown-it-bidi": "^0.1.0",
|
||||
"mini-css-extract-plugin": "^2.7.5",
|
||||
"register-service-worker": "^1.7.2",
|
||||
"run-node-webpack-plugin": "^1.3.0",
|
||||
|
|
|
@ -54,6 +54,11 @@ export class App extends Component<AppProps, any> {
|
|||
>
|
||||
{I18NextService.i18n.t("jump_to_content", "Jump to content")}
|
||||
</button>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css"
|
||||
></link>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
||||
{siteView && (
|
||||
<Theme defaultTheme={siteView.local_site.default_theme} />
|
||||
)}
|
||||
|
|
|
@ -14,6 +14,7 @@ import markdown_it_html5_embed from "markdown-it-html5-embed";
|
|||
import markdown_it_ruby from "markdown-it-ruby";
|
||||
import markdown_it_sub from "markdown-it-sub";
|
||||
import markdown_it_sup from "markdown-it-sup";
|
||||
import markdown_it_highlightjs from "markdown-it-highlightjs";
|
||||
import Renderer from "markdown-it/lib/renderer";
|
||||
import Token from "markdown-it/lib/token";
|
||||
import { instanceLinkRegex, relTags } from "./config";
|
||||
|
@ -170,6 +171,7 @@ export function setupMarkdown() {
|
|||
.use(markdown_it_footnote)
|
||||
.use(markdown_it_html5_embed, html5EmbedConfig)
|
||||
.use(markdown_it_container, "spoiler", spoilerConfig)
|
||||
.use(markdown_it_highlightjs, { inline: true })
|
||||
.use(markdown_it_ruby)
|
||||
.use(localInstanceLinkParser)
|
||||
.use(markdown_it_bidi);
|
||||
|
|
Loading…
Reference in a new issue