@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 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 tables, strikethrough, task lists, and autolinked headings.
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 github:quartz-community/github-flavored-markdown
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: github:quartz-community/github-flavored-markdown
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
- For advanced use cases, you can override in TypeScript:
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
- ```ts title="quartz.ts (override)"
22
- import * as ExternalPlugin from "./.quartz/plugins";
27
+ ## Configuration
23
28
 
24
- ExternalPlugin.GitHubFlavoredMarkdown({
25
- enableSmartyPants: true,
26
- linkHeadings: true,
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
- ## Configuration
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
- | Option | Type | Default | Description |
33
- | ------------------- | --------- | ------- | ------------------------------ |
34
- | `enableSmartyPants` | `boolean` | `true` | Whether to enable SmartyPants. |
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