feat: plugin for remark-breaks (#467)
* feat: plugin for remark-breaks
* fix: update package-lock.json
* fix: styling
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
* Update linebreaks.ts
* Update index.ts
---------
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
1 files added
3 files modified
| | |
| | | "rehype-raw": "^6.1.1", |
| | | "rehype-slug": "^5.1.0", |
| | | "remark": "^14.0.2", |
| | | "remark-breaks": "^3.0.3", |
| | | "remark-frontmatter": "^4.0.1", |
| | | "remark-gfm": "^3.0.1", |
| | | "remark-math": "^5.1.1", |
| | |
| | | "url": "https://opencollective.com/unified" |
| | | } |
| | | }, |
| | | "node_modules/mdast-util-newline-to-break": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmjs.org/mdast-util-newline-to-break/-/mdast-util-newline-to-break-1.0.0.tgz", |
| | | "integrity": "sha512-491LcYv3gbGhhCrLoeALncQmega2xPh+m3gbsIhVsOX4sw85+ShLFPvPyibxc1Swx/6GtzxgVodq+cGa/47ULg==", |
| | | "dependencies": { |
| | | "@types/mdast": "^3.0.0", |
| | | "mdast-util-find-and-replace": "^2.0.0" |
| | | }, |
| | | "funding": { |
| | | "type": "opencollective", |
| | | "url": "https://opencollective.com/unified" |
| | | } |
| | | }, |
| | | "node_modules/mdast-util-phrasing": { |
| | | "version": "3.0.1", |
| | | "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz", |
| | |
| | | "url": "https://opencollective.com/unified" |
| | | } |
| | | }, |
| | | "node_modules/remark-breaks": { |
| | | "version": "3.0.3", |
| | | "resolved": "https://registry.npmjs.org/remark-breaks/-/remark-breaks-3.0.3.tgz", |
| | | "integrity": "sha512-C7VkvcUp1TPUc2eAYzsPdaUh8Xj4FSbQnYA5A9f80diApLZscTDeG7efiWP65W8hV2sEy3JuGVU0i6qr5D8Hug==", |
| | | "dependencies": { |
| | | "@types/mdast": "^3.0.0", |
| | | "mdast-util-newline-to-break": "^1.0.0", |
| | | "unified": "^10.0.0" |
| | | }, |
| | | "funding": { |
| | | "type": "opencollective", |
| | | "url": "https://opencollective.com/unified" |
| | | } |
| | | }, |
| | | "node_modules/remark-frontmatter": { |
| | | "version": "4.0.1", |
| | | "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", |
| | |
| | | "rehype-raw": "^6.1.1", |
| | | "rehype-slug": "^5.1.0", |
| | | "remark": "^14.0.2", |
| | | "remark-breaks": "^3.0.3", |
| | | "remark-frontmatter": "^4.0.1", |
| | | "remark-gfm": "^3.0.1", |
| | | "remark-math": "^5.1.1", |
| | |
| | | export { OxHugoFlavouredMarkdown } from "./oxhugofm" |
| | | export { SyntaxHighlighting } from "./syntax" |
| | | export { TableOfContents } from "./toc" |
| | | export { HardLineBreaks } from "./linebreaks" |
| New file |
| | |
| | | import { QuartzTransformerPlugin } from "../types" |
| | | import remarkBreaks from "remark-breaks" |
| | | |
| | | export const HardLineBreaks: QuartzTransformerPlugin = () => { |
| | | return { |
| | | name: "HardLineBreaks", |
| | | markdownPlugins() { |
| | | return [remarkBreaks] |
| | | }, |
| | | } |
| | | } |