Skip to content

Commit

Permalink
Change to open url in new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
devleejb committed Nov 15, 2024
1 parent 462e21e commit c253a5e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
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.

0 comments on commit c253a5e

Please sign in to comment.