mirror of
https://github.com/danbulant/lezer-markdown-obsidian
synced 2026-06-22 16:12:01 +00:00
Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6223674c53 | ||
|
|
47bed7489e | ||
|
|
7ed8ebf669 | ||
|
|
d81022e19b | ||
|
|
549860b85b | ||
|
|
d95d1874ae | ||
|
|
a49a0a39a0 |
7 changed files with 243 additions and 44 deletions
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 Eric Rykwalder
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
125
README.md
Normal file
125
README.md
Normal file
|
|
@ -0,0 +1,125 @@
|
||||||
|
# lezer-markdown-obsidian
|
||||||
|
|
||||||
|
This package is a set of extensions for [@lezer/markdown](https://github.com/lezer-parser/markdown) to add support for the Obsidian's added markdown syntax.
|
||||||
|
|
||||||
|
**Warning: This is not the parser that Obsidian itself uses. All parsing is a best attempt to match the way Obsidian parses markdown, and will not guarantee a 1-for-1 replication.**
|
||||||
|
|
||||||
|
If you recognize a difference in parsing, please open an issue.
|
||||||
|
|
||||||
|
## `parser`
|
||||||
|
|
||||||
|
The simplest was to use the library if you want full obsidian parsing is to import the parser:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { parser } from "lezer-markdown-obsidian";
|
||||||
|
|
||||||
|
const tree = parser.parse("# Some Markdown");
|
||||||
|
```
|
||||||
|
|
||||||
|
This parser includes all the extensions below, as well as the `Strikethrough` and `Table` extensions from `@lezer/markdown`.
|
||||||
|
|
||||||
|
## Extensions
|
||||||
|
|
||||||
|
You can configure your own parser with specific extensions:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { parser as mdParser } from "@lezer/markdown";
|
||||||
|
import { Comment, InternalLink } from "lezer-markdown-obsidian";
|
||||||
|
|
||||||
|
const parser = mdParser.configure([Comment, InternalLink]);
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Extensions`
|
||||||
|
|
||||||
|
An array of all the extensions for Obsidian's markdown syntax.
|
||||||
|
|
||||||
|
### `BlockAndInline`
|
||||||
|
|
||||||
|
An array of all the extensions except YAML frontmatter.
|
||||||
|
|
||||||
|
### `Comment`
|
||||||
|
|
||||||
|
This adds support for parsing comments in the form of: `%%comment%%`.
|
||||||
|
|
||||||
|
Comments that begin at the start of a line can span multiple lines, and will go to the end of the document unless terminated.
|
||||||
|
|
||||||
|
Comments that are inline must be completed on the same line.
|
||||||
|
|
||||||
|
### `Footnote`
|
||||||
|
|
||||||
|
This adds support for detecting footnotes and footnote references.
|
||||||
|
|
||||||
|
Footnotes are in the form of:
|
||||||
|
`This has a footnote.[^1]`
|
||||||
|
|
||||||
|
References are in the form of:
|
||||||
|
`[^1]: Here is some additional info.`
|
||||||
|
|
||||||
|
References can span multiple lines as long as they are not interrupted by another block.
|
||||||
|
|
||||||
|
### `Hashtag`
|
||||||
|
|
||||||
|
This adds support for hashtags. Hashtags are pretty flexible in what can be tagged, only forbidding certain special characters.
|
||||||
|
|
||||||
|
`#this-is-a-tag`
|
||||||
|
|
||||||
|
`#nested/tag`
|
||||||
|
|
||||||
|
### `InternalLink`
|
||||||
|
|
||||||
|
This adds support for internal links and embeds.
|
||||||
|
|
||||||
|
Internal links are structured like:
|
||||||
|
`[[File#heading|display]]`
|
||||||
|
|
||||||
|
Internal embeds are structured like:
|
||||||
|
`![[File#heading]]`
|
||||||
|
|
||||||
|
The `#heading` and `|display` parts are optional. Heading can be a `#^blockid` instead, and multiple headings can be chained together.
|
||||||
|
|
||||||
|
### `Mark`
|
||||||
|
|
||||||
|
This adds support for highlight marks in the form of `==highlighted==`.
|
||||||
|
|
||||||
|
### `TaskList`
|
||||||
|
|
||||||
|
This adds support for Obsidian's task lists, which allow support for arbitrary characters for tasks. This makes it different from GFM task lists.
|
||||||
|
|
||||||
|
Open tasks are in the form of:
|
||||||
|
`- [ ] This is an uncompleted task`
|
||||||
|
|
||||||
|
Completed tasks are in the form of:
|
||||||
|
`- [x] This is a completed task`
|
||||||
|
|
||||||
|
Special tasks can replace `x` with any character in the completed form.
|
||||||
|
|
||||||
|
### `Tex`
|
||||||
|
|
||||||
|
This adds support for LaTex style formulas, both inline and block level. In Obsidian, these are rendered with MathJax.
|
||||||
|
|
||||||
|
Inline is in the form of:
|
||||||
|
`Here is some math: $1 + 2 = 3$`
|
||||||
|
|
||||||
|
Block level is in the form of:
|
||||||
|
|
||||||
|
```
|
||||||
|
$$
|
||||||
|
\vec v = \vec a t
|
||||||
|
$$
|
||||||
|
```
|
||||||
|
|
||||||
|
**Warning: Obsidian can also parse blocks as inline elements, which is currently not supported.**
|
||||||
|
|
||||||
|
### `YAMLFrontmatter`
|
||||||
|
|
||||||
|
This adds support for a frontmatter block of YAML. The frontmatter must be the first block in the document, otherwise it is treated as markdown. The YAML must be surrounded by lines with `---`.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
---
|
||||||
|
author: Eric
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
**If you are parsing subselections of a document, you will want to configure a parser that does not include `YAMLFrontmatter`, since it will be unable to distinguise horizontal rules from frontmatter.**
|
||||||
|
|
@ -15,6 +15,10 @@ const specParser = new SpecParser(parser, {
|
||||||
cm: "CommentMarker",
|
cm: "CommentMarker",
|
||||||
EM: "Embed",
|
EM: "Embed",
|
||||||
eM: "EmbedMark",
|
eM: "EmbedMark",
|
||||||
|
FN: "Footnote",
|
||||||
|
fM: "FootnoteMark",
|
||||||
|
fL: "FootnoteLabel",
|
||||||
|
FR: "FootnoteReference",
|
||||||
H: "Hashtag",
|
H: "Hashtag",
|
||||||
hm: "HashtagMark",
|
hm: "HashtagMark",
|
||||||
hl: "HashtagLabel",
|
hl: "HashtagLabel",
|
||||||
|
|
@ -23,16 +27,14 @@ const specParser = new SpecParser(parser, {
|
||||||
iP: "InternalPath",
|
iP: "InternalPath",
|
||||||
iS: "InternalSubpath",
|
iS: "InternalSubpath",
|
||||||
iD: "InternalDisplay",
|
iD: "InternalDisplay",
|
||||||
FN: "Footnote",
|
M: "Mark",
|
||||||
fM: "FootnoteMark",
|
mm: "MarkMarker",
|
||||||
fL: "FootnoteLabel",
|
|
||||||
FR: "FootnoteReference",
|
|
||||||
YF: "YAMLFrontMatter",
|
|
||||||
ym: "YAMLMarker",
|
|
||||||
yc: "YAMLContent",
|
|
||||||
XB: "TexBlock",
|
XB: "TexBlock",
|
||||||
XI: "TexInline",
|
XI: "TexInline",
|
||||||
xm: "TexMarker",
|
xm: "TexMarker",
|
||||||
|
YF: "YAMLFrontMatter",
|
||||||
|
ym: "YAMLMarker",
|
||||||
|
yc: "YAMLContent",
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -192,6 +194,40 @@ Line 5}
|
||||||
Copyright (C) 2020 by Marijn Haverbeke <marijnh@gmail.com> and others
|
Copyright (C) 2020 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||||
https://github.com/lezer-parser/markdown/blob/f49eb8c8c82cfe45aa213ca1fe2cebc95305b88b/LICENSE
|
https://github.com/lezer-parser/markdown/blob/f49eb8c8c82cfe45aa213ca1fe2cebc95305b88b/LICENSE
|
||||||
*/
|
*/
|
||||||
|
test(
|
||||||
|
"Mark",
|
||||||
|
`
|
||||||
|
{P:{M:{mm:==}Hi{mm:==}} Hello, world!}`
|
||||||
|
);
|
||||||
|
|
||||||
|
test(
|
||||||
|
"Mark 2",
|
||||||
|
`
|
||||||
|
{P:This ==has a}
|
||||||
|
|
||||||
|
{P:new paragraph==.}`
|
||||||
|
);
|
||||||
|
|
||||||
|
test(
|
||||||
|
"Mark (nested)",
|
||||||
|
`
|
||||||
|
{P:Nesting {St:{e:**}with {M:{mm:==}emphasis{mm:==}}{e:**}}.}`
|
||||||
|
);
|
||||||
|
|
||||||
|
test(
|
||||||
|
"Mark (overlapping)",
|
||||||
|
`
|
||||||
|
{P:One {St:{e:**}two ==three{e:**}} four==}
|
||||||
|
|
||||||
|
{P:One {M:{mm:==}two **three{mm:==}} four**}`
|
||||||
|
);
|
||||||
|
|
||||||
|
test(
|
||||||
|
"Mark (escaped)",
|
||||||
|
`
|
||||||
|
{P:A {Esc:\\=}=b c==}`
|
||||||
|
);
|
||||||
|
|
||||||
test(
|
test(
|
||||||
"Task list (in unordered list)",
|
"Task list (in unordered list)",
|
||||||
`
|
`
|
||||||
|
|
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "lezer-markdown-obsidian",
|
"name": "lezer-markdown-obsidian",
|
||||||
"version": "0.0.1",
|
"version": "0.0.3",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "lezer-markdown-obsidian",
|
"name": "lezer-markdown-obsidian",
|
||||||
"version": "0.0.1",
|
"version": "0.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lezer/common": "^0.15.11",
|
"@lezer/common": "^0.15.11",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "lezer-markdown-obsidian",
|
"name": "lezer-markdown-obsidian",
|
||||||
"description": "Obsidian Markdown extensions for @lezer/markdown",
|
"description": "Obsidian Markdown extensions for @lezer/markdown",
|
||||||
"version": "0.0.1",
|
"version": "0.0.3",
|
||||||
"main": "dist/index.cjs",
|
"main": "dist/index.cjs",
|
||||||
"module": "dist/index.js",
|
"module": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
|
|
||||||
|
|
@ -13,18 +13,20 @@ import {
|
||||||
} from "@lezer/markdown";
|
} from "@lezer/markdown";
|
||||||
|
|
||||||
declare module "@lezer/markdown" {
|
declare module "@lezer/markdown" {
|
||||||
class BlockContext {
|
interface BlockContext {
|
||||||
readonly input: Input;
|
readonly input: Input;
|
||||||
checkedYaml: boolean | null;
|
checkedYaml: boolean | null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const CommentDelim = { resolve: "Comment", mark: "CommentMarker" };
|
||||||
|
|
||||||
export const Comment: MarkdownConfig = {
|
export const Comment: MarkdownConfig = {
|
||||||
defineNodes: ["Comment", "CommentMarker"],
|
defineNodes: ["Comment", "CommentMarker"],
|
||||||
parseBlock: [
|
parseBlock: [
|
||||||
{
|
{
|
||||||
name: "CommentBlock",
|
name: "CommentBlock",
|
||||||
endLeaf: (cx, line: Line) => {
|
endLeaf: (_, line: Line) => {
|
||||||
return line.text.slice(line.pos, line.pos + 2) == "%%";
|
return line.text.slice(line.pos, line.pos + 2) == "%%";
|
||||||
},
|
},
|
||||||
parse(cx: BlockContext, line: Line) {
|
parse(cx: BlockContext, line: Line) {
|
||||||
|
|
@ -66,18 +68,17 @@ export const Comment: MarkdownConfig = {
|
||||||
{
|
{
|
||||||
name: "CommentInline",
|
name: "CommentInline",
|
||||||
parse(cx: InlineContext, next: number, pos: number) {
|
parse(cx: InlineContext, next: number, pos: number) {
|
||||||
let match = /^%%[^\n]*[^\n\\]%%/.exec(cx.text.slice(pos - cx.offset));
|
if (next == 37 && cx.char(pos + 1) == 37) {
|
||||||
if (!match) {
|
let canClose = true;
|
||||||
return -1;
|
if (
|
||||||
|
cx.slice(cx.offset, pos).lastIndexOf("\n") >
|
||||||
|
cx.slice(cx.offset, pos).lastIndexOf("%%")
|
||||||
|
) {
|
||||||
|
canClose = false;
|
||||||
|
}
|
||||||
|
return cx.addDelimiter(CommentDelim, pos, pos + 2, true, canClose);
|
||||||
}
|
}
|
||||||
const start = pos;
|
return -1;
|
||||||
const end = pos + match[0].length;
|
|
||||||
return cx.addElement(
|
|
||||||
cx.elt("Comment", start, end, [
|
|
||||||
cx.elt("CommentMarker", start, start + 2),
|
|
||||||
cx.elt("CommentMarker", end - 2, end),
|
|
||||||
])
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -129,7 +130,7 @@ export const Footnote: MarkdownConfig = {
|
||||||
parseInline: [
|
parseInline: [
|
||||||
{
|
{
|
||||||
name: "Footnote",
|
name: "Footnote",
|
||||||
parse(cx: InlineContext, _: number, pos: number) {
|
parse(cx: InlineContext, _, pos: number) {
|
||||||
// typically [^1], but inside can match any characters but
|
// typically [^1], but inside can match any characters but
|
||||||
// square brackets and spaces.
|
// square brackets and spaces.
|
||||||
const match = /^\[\^[^\s[\]]+\]/.exec(cx.text.slice(pos - cx.offset));
|
const match = /^\[\^[^\s[\]]+\]/.exec(cx.text.slice(pos - cx.offset));
|
||||||
|
|
@ -151,7 +152,7 @@ export const Footnote: MarkdownConfig = {
|
||||||
parseBlock: [
|
parseBlock: [
|
||||||
{
|
{
|
||||||
name: "FootnoteReference",
|
name: "FootnoteReference",
|
||||||
leaf(cx: BlockContext, leaf: LeafBlock): LeafBlockParser | null {
|
leaf(_, leaf: LeafBlock): LeafBlockParser | null {
|
||||||
const ref = isFootnoteRef(leaf.content);
|
const ref = isFootnoteRef(leaf.content);
|
||||||
if (ref != -1) {
|
if (ref != -1) {
|
||||||
return new FootnoteReferenceParser(leaf.start + ref);
|
return new FootnoteReferenceParser(leaf.start + ref);
|
||||||
|
|
@ -176,7 +177,7 @@ export const Hashtag: MarkdownConfig = {
|
||||||
parseInline: [
|
parseInline: [
|
||||||
{
|
{
|
||||||
name: "Hashtag",
|
name: "Hashtag",
|
||||||
parse(cx, next, pos) {
|
parse(cx: InlineContext, next: number, pos: number) {
|
||||||
if (next != 35 /* # */) {
|
if (next != 35 /* # */) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -211,7 +212,7 @@ export const InternalLink: MarkdownConfig = {
|
||||||
parseInline: [
|
parseInline: [
|
||||||
{
|
{
|
||||||
name: "InternalLink",
|
name: "InternalLink",
|
||||||
parse(cx: InlineContext, _: number, pos: number) {
|
parse(cx: InlineContext, _, pos: number) {
|
||||||
const el = parseInternalLink(cx, pos);
|
const el = parseInternalLink(cx, pos);
|
||||||
if (el) {
|
if (el) {
|
||||||
return cx.addElement(el);
|
return cx.addElement(el);
|
||||||
|
|
@ -339,6 +340,21 @@ function parseDisplay(cx: InlineContext, start: number): Element | null {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const MarkDelim = { resolve: "Mark", mark: "MarkMarker" };
|
||||||
|
|
||||||
|
export const Mark: MarkdownConfig = {
|
||||||
|
defineNodes: ["Mark", "MarkMarker"],
|
||||||
|
parseInline: [
|
||||||
|
{
|
||||||
|
name: "Mark",
|
||||||
|
parse(cx: InlineContext, next: number, pos: number) {
|
||||||
|
if (next != 61 /* '=' */ || cx.char(pos + 1) != 61) return -1;
|
||||||
|
return cx.addDelimiter(MarkDelim, pos, pos + 2, true, true);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2020 by Marijn Haverbeke <marijnh@gmail.com> and others
|
Copyright (C) 2020 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||||
https://github.com/lezer-parser/markdown/blob/f49eb8c8c82cfe45aa213ca1fe2cebc95305b88b/LICENSE
|
https://github.com/lezer-parser/markdown/blob/f49eb8c8c82cfe45aa213ca1fe2cebc95305b88b/LICENSE
|
||||||
|
|
@ -370,7 +386,7 @@ export const TaskList: MarkdownConfig = {
|
||||||
parseBlock: [
|
parseBlock: [
|
||||||
{
|
{
|
||||||
name: "TaskList",
|
name: "TaskList",
|
||||||
leaf(cx, leaf) {
|
leaf(cx: BlockContext, leaf: LeafBlock) {
|
||||||
return /^\[.\]/.test(leaf.content) && cx.parentType().name == "ListItem"
|
return /^\[.\]/.test(leaf.content) && cx.parentType().name == "ListItem"
|
||||||
? new TaskParser()
|
? new TaskParser()
|
||||||
: null;
|
: null;
|
||||||
|
|
@ -381,6 +397,8 @@ export const TaskList: MarkdownConfig = {
|
||||||
};
|
};
|
||||||
/* End Copyright */
|
/* End Copyright */
|
||||||
|
|
||||||
|
const TexDelim = { resolve: "TexInline", mark: "TexMarker" };
|
||||||
|
|
||||||
export const Tex: MarkdownConfig = {
|
export const Tex: MarkdownConfig = {
|
||||||
defineNodes: ["TexBlock", "TexInline", "TexMarker"],
|
defineNodes: ["TexBlock", "TexInline", "TexMarker"],
|
||||||
parseBlock: [
|
parseBlock: [
|
||||||
|
|
@ -429,20 +447,14 @@ export const Tex: MarkdownConfig = {
|
||||||
{
|
{
|
||||||
name: "TexInline",
|
name: "TexInline",
|
||||||
parse(cx: InlineContext, next: number, pos: number) {
|
parse(cx: InlineContext, next: number, pos: number) {
|
||||||
let match = /^\$(?:[^$\t ][^$]*)?[^$\t \\]\$(\D|$)/.exec(
|
if (next != 36 /* $ */) {
|
||||||
cx.text.slice(pos - cx.offset)
|
|
||||||
);
|
|
||||||
if (!match) {
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
const start = pos;
|
const before = cx.slice(pos - 1, pos);
|
||||||
const end = start + match[0].length - match[1].length;
|
const after = cx.slice(pos + 1, pos + 2);
|
||||||
return cx.addElement(
|
const canClose = /[^ \t]/.test(before) && !/\d/.test(after);
|
||||||
cx.elt("TexInline", start, end, [
|
const canOpen = /[^$ \t]/.test(after);
|
||||||
cx.elt("TexMarker", start, start + 1),
|
return cx.addDelimiter(TexDelim, pos, pos + 1, canOpen, canClose);
|
||||||
cx.elt("TexMarker", end - 1, end),
|
|
||||||
])
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -453,7 +465,7 @@ export const YAMLFrontMatter: MarkdownConfig = {
|
||||||
parseBlock: [
|
parseBlock: [
|
||||||
{
|
{
|
||||||
name: "YAMLFrontMatter",
|
name: "YAMLFrontMatter",
|
||||||
parse(cx, line) {
|
parse(cx: BlockContext, line: Line) {
|
||||||
if (cx.checkedYaml) {
|
if (cx.checkedYaml) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -481,11 +493,12 @@ export const YAMLFrontMatter: MarkdownConfig = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ObsidianMDExtensions = [
|
export const Extensions = [
|
||||||
Comment,
|
Comment,
|
||||||
Footnote,
|
Footnote,
|
||||||
Hashtag,
|
Hashtag,
|
||||||
InternalLink,
|
InternalLink,
|
||||||
|
Mark,
|
||||||
Strikethrough,
|
Strikethrough,
|
||||||
Table,
|
Table,
|
||||||
TaskList,
|
TaskList,
|
||||||
|
|
@ -493,4 +506,6 @@ export const ObsidianMDExtensions = [
|
||||||
YAMLFrontMatter,
|
YAMLFrontMatter,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const parser = defParser.configure(ObsidianMDExtensions);
|
export const BlockAndInline = Extensions.slice(0, -1);
|
||||||
|
|
||||||
|
export const parser = defParser.configure(Extensions);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
export {
|
export {
|
||||||
|
BlockAndInline,
|
||||||
Comment,
|
Comment,
|
||||||
|
Extensions,
|
||||||
Footnote,
|
Footnote,
|
||||||
Hashtag,
|
Hashtag,
|
||||||
InternalLink,
|
InternalLink,
|
||||||
ObsidianMDExtensions,
|
Mark,
|
||||||
parser,
|
parser,
|
||||||
TaskList,
|
TaskList,
|
||||||
Tex,
|
Tex,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue