Skip to content

Commit

Permalink
WIP: Parsing obsidian image link
Browse files Browse the repository at this point in the history
  • Loading branch information
TuanManhCao committed Apr 28, 2022
1 parent 47d0eb2 commit ba519d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Node} from "./node";
import rehypePrism from 'rehype-prism-plus'
import remarkRehype from 'remark-rehype'
import rehypeStringify from 'rehype-stringify'

import obsidianImage from './obsidian-image.js'
import {getAllMarkdownFiles, toFilePath, toSlug} from "./utils";

export const Transformer = {
Expand Down Expand Up @@ -62,7 +62,8 @@ export const Transformer = {

unified()
.use(markdown, {gfm: true})
.use(highlight)
.use(obsidianImage)
.use(highlight)
.use(externalLinks, {target: "_blank", rel: ['noopener']})
.use(frontmatter, ['yaml', 'toml'])
.use(wikiLinkPlugin, {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"remark-wiki-link": "^1.0.0",
"to-vfile": "^6.1.0",
"unified": "^9.2.0",
"unist-util-visit": "^4.1.0",
"vfile-reporter": "^6.0.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4329,7 +4329,7 @@ unist-util-visit@^3.0.0:
unist-util-is "^5.0.0"
unist-util-visit-parents "^4.0.0"

unist-util-visit@^4.0.0:
unist-util-visit@^4.0.0, unist-util-visit@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-4.1.0.tgz#f41e407a9e94da31594e6b1c9811c51ab0b3d8f5"
integrity sha512-n7lyhFKJfVZ9MnKtqbsqkQEk5P1KShj0+//V7mAcoI6bpbUjh3C/OG8HVD+pBihfh6Ovl01m8dkcv9HNqYajmQ==
Expand Down

0 comments on commit ba519d7

Please sign in to comment.