@canopycanopycanopy/b-ber-grammar-footnotes 2.0.0 → 3.0.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.
Files changed (2) hide show
  1. package/dist/index.js +5 -10
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,19 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
-
7
5
  _Object$defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
-
11
8
  exports.default = markdownItFootnotePlugin;
12
-
13
9
  var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
14
-
15
10
  var _State = _interopRequireDefault(require("@canopycanopycanopy/b-ber-lib/State"));
16
-
17
11
  function markdownItFootnotePlugin(self) {
18
12
  return function plugin(tokens) {
19
13
  const {
@@ -22,9 +16,10 @@ function markdownItFootnotePlugin(self) {
22
16
  const entry = (0, _find.default)(_State.default).call(_State.default, 'spine.flattened', {
23
17
  fileName
24
18
  });
25
- const title = (entry === null || entry === void 0 ? void 0 : entry.title) || fileName; // Add footnote container and heading. Doing this here instead of in
26
- // `footnotes.js` because we need the file's title
19
+ const title = (entry === null || entry === void 0 ? void 0 : entry.title) || fileName;
27
20
 
21
+ // Add footnote container and heading. Doing this here instead of in
22
+ // `footnotes.js` because we need the file's title
28
23
  tokens.unshift({
29
24
  type: 'block',
30
25
  tag: 'section',
@@ -44,8 +39,9 @@ function markdownItFootnotePlugin(self) {
44
39
  type: 'block',
45
40
  tag: 'h1',
46
41
  nesting: -1
47
- }); // add closing section tag
42
+ });
48
43
 
44
+ // add closing section tag
49
45
  tokens.push({
50
46
  type: 'block',
51
47
  tag: 'section',
@@ -54,7 +50,6 @@ function markdownItFootnotePlugin(self) {
54
50
  const notes = self.markdownIt.renderer.render(tokens, 0, {
55
51
  reference: `${fileName}.xhtml`
56
52
  });
57
-
58
53
  _State.default.add('footnotes', {
59
54
  fileName,
60
55
  title,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopycanopycanopy/b-ber-grammar-footnotes",
3
- "version": "2.0.0",
3
+ "version": "3.0.2",
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": "2.0.0",
28
+ "@canopycanopycanopy/b-ber-lib": "3.0.2",
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": "dbeae192709705f5bc211195ff343cbd999f9caf"
50
+ "gitHead": "1ec8ab9a4030fb59839d347beb04ab7605e3d5dd"
51
51
  }