Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to open url in new tab #409

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"lodash": "^4.17.21",
"markdown-it": "^14.1.0",
"markdown-it-incremental-dom": "^2.1.0",
"markdown-it-link-attributes": "^4.0.1",
"markdown-it-prism": "^2.3.0",
"markdown-it-sanitizer": "^0.4.3",
"markdown-it-task-checkbox": "^1.0.6",
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/editor/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { refractor } from "refractor";
import markdownItIncrementalDOM from "markdown-it-incremental-dom";
import markdownItSanitizer from "markdown-it-sanitizer";
import markdownItTaskCheckbox from "markdown-it-task-checkbox";
import mila from "markdown-it-link-attributes";
import * as IncrementalDOM from "incremental-dom";
import "./editor.css";
import "./preview.css";
Expand All @@ -36,6 +37,12 @@ const md = new MarkdownIt({
},
})
.use(markdownItTaskCheckbox)
.use(mila, {
attrs: {
target: "_blank",
rel: "noopener noreferrer",
},
})
.use(markdownItIncrementalDOM, IncrementalDOM, {
incrementalizeDefaultRules: false,
})
Expand Down
1 change: 1 addition & 0 deletions frontend/src/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
declare module "markdown-it-incremental-dom";
declare module "markdown-it-sanitizer";
declare module "markdown-it-task-checkbox";
declare module "markdown-it-link-attributes";
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.