@quartz-community/github-flavored-markdown 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +21 -16
- package/dist/index.js +680 -2180
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5a1722a: Heading anchor links render `aria-hidden="true"` instead of a bare `aria-hidden`, which assistive technology doesn't read as "true". The icon-only link was exposed as a link with no name and an unknown role (`role="anchor"`, kept as a styling hook).
|
|
8
|
+
|
|
9
|
+
## 2.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- b581f72: Uses Quartz's own `preact` instead of bundling a second copy (`noExternal` in the build overrode the externals). Components now share one Preact instance with Quartz and other plugins, so hooks and context work across them, and the bundle is smaller.
|
|
14
|
+
|
|
3
15
|
## 2.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,38 +1,43 @@
|
|
|
1
1
|
# @quartz-community/github-flavored-markdown
|
|
2
2
|
|
|
3
|
-
Adds GitHub Flavored Markdown support including
|
|
3
|
+
Adds GitHub Flavored Markdown support including autolink literals, footnotes, strikethrough, tables, task lists, SmartyPants typography and linked headings.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx quartz plugin add
|
|
8
|
+
npx quartz plugin add @quartz-community/github-flavored-markdown
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
+
This plugin is already enabled in the default `quartz.config.yaml`:
|
|
14
|
+
|
|
13
15
|
```yaml title="quartz.config.yaml"
|
|
14
16
|
plugins:
|
|
15
|
-
- source:
|
|
17
|
+
- source: "@quartz-community/github-flavored-markdown"
|
|
16
18
|
enabled: true
|
|
19
|
+
options:
|
|
20
|
+
enableSmartyPants: true
|
|
21
|
+
linkHeadings: true
|
|
22
|
+
order: 30
|
|
17
23
|
```
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
This plugin must run before [obsidian-flavored-markdown](https://github.com/quartz-community/obsidian-flavored-markdown) (order `30` and `40` in the default config). If you set `order` on either plugin, keep this one first.
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
import * as ExternalPlugin from "./.quartz/plugins";
|
|
27
|
+
## Configuration
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
+
| Option | Type | Default | Description |
|
|
30
|
+
| ------------------- | --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
31
|
+
| `enableSmartyPants` | `boolean` | `true` | Typographic enhancements: curly quotes, en/em dashes, ellipses. |
|
|
32
|
+
| `linkHeadings` | `boolean` | `true` | Gives headings their `id`s and adds an anchor link to each. `false` also turns off heading ids, so links to headings (`[[page#Heading]]`) and section embeds no longer reach them (the table of contents plugin still adds ids on pages that show it). |
|
|
29
33
|
|
|
30
|
-
##
|
|
34
|
+
## Heading ids
|
|
35
|
+
|
|
36
|
+
Heading ids are made from the heading as written, with the same slug function that links and the table of contents use, and match GitHub's and Obsidian's:
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
| `linkHeadings` | `boolean` | `true` | Whether to link headings. |
|
|
38
|
+
- With SmartyPants on, a heading containing `--` keeps it in its id: `## Range 1--2` → `range-1--2` (before Quartz 5.1: `range-12`). `[[page#Range 1--2]]` keeps working.
|
|
39
|
+
- Headings containing `:`, `|`, `^`, `#` or `\` get an extra anchor with the id Obsidian links use (spaces instead of those characters), so such links and section embeds reach them.
|
|
40
|
+
- A same-page link written as a heading's text, such as `[x](<#My Heading>)`, points at the heading's id.
|
|
36
41
|
|
|
37
42
|
## Documentation
|
|
38
43
|
|