@canopycanopycanopy/b-ber-grammar-footnotes 3.0.8-nav.0 → 3.0.8-next.61

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.
Files changed (2) hide show
  1. package/README.md +15 -4
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,9 +1,20 @@
1
- # `@canopycanopycanopy/b-ber-grammar-footnotes`
1
+ # b-ber-grammar-footnotes
2
2
 
3
- The `b-ber-grammar-footnotes` package renders b-ber's custom `footnotes` Markdown extension (directive) into HTML. More information about b-ber directives can be found in the [All directives](https://github.com/triplecanopy/b-ber/wiki/all-directives) page in the b-ber [Wiki](https://github.com/triplecanopy/b-ber/wiki).
3
+ Handles footnote collection and rendering as a MarkdownIt core rule (not a container directive). After MarkdownIt processes a source file, this package's plugin function receives the full token stream, prepends a `<section class="footnotes break-after">` wrapper with an `<h1>` heading (using the spine entry's title for the current file), appends the closing `</section>`, renders the augmented token stream to HTML, and stores the result in global state under `state.footnotes`. Footnote pages are generated later by `b-ber-parser-footnotes` from that collected state.
4
4
 
5
- ## Install
5
+ ## Usage
6
6
 
7
+ Registered as a MarkdownIt core rule by the rendering engine:
8
+
9
+ ```js
10
+ import footnotes from '@canopycanopycanopy/b-ber-grammar-footnotes'
11
+ // default export is a factory: (self) => plugin(tokens)
7
12
  ```
8
- $ npm i -g @canopycanopycanopy/b-ber-grammar-footnotes
13
+
14
+ ## Dev
15
+
9
16
  ```
17
+ npm test
18
+ ```
19
+
20
+ Tests are in `__tests__/index.test.js`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopycanopycanopy/b-ber-grammar-footnotes",
3
- "version": "3.0.8-nav.0+24db1e6b",
3
+ "version": "3.0.8-next.61+2bbec564",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -25,7 +25,7 @@
25
25
  "rimraf": "^2.7.1"
26
26
  },
27
27
  "dependencies": {
28
- "@canopycanopycanopy/b-ber-lib": "3.0.8-nav.0+24db1e6b",
28
+ "@canopycanopycanopy/b-ber-lib": "3.0.8-next.61+2bbec564",
29
29
  "lodash": "^4.17.21",
30
30
  "lodash.find": "latest",
31
31
  "tar": "^6.1.11"
@@ -47,5 +47,5 @@
47
47
  "url": "https://maxwellsimmer.com"
48
48
  }
49
49
  ],
50
- "gitHead": "24db1e6bb491faae0d52c6dadc09d974a5a31cf5"
50
+ "gitHead": "2bbec5643278f53becb0d2ba1f55edfe379d5587"
51
51
  }