book-source 0.3.1 → 0.3.3

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.
@@ -109,7 +109,7 @@ StructuredDocument.prototype.renderParts = function( renderer , parts , partStac
109
109
  let partsOutput = fragment.new() ;
110
110
 
111
111
  if ( renderer[ preFn ] ) {
112
- renderer[ preFn ]( part , partStack , userlandStack , index ) ;
112
+ renderer[ preFn ]( part , partStack , userlandStack , index , parts.length ) ;
113
113
  }
114
114
 
115
115
  if ( part.parts ) {
@@ -153,7 +153,7 @@ StructuredDocument.prototype.renderParts = function( renderer , parts , partStac
153
153
  if ( renderer[ postFn ] ) {
154
154
  output = fragment.append(
155
155
  output ,
156
- renderer[ postFn ]( part , partsOutput , partStack , userlandStack , index )
156
+ renderer[ postFn ]( part , partsOutput , partStack , userlandStack , index , parts.length )
157
157
  ) ;
158
158
  }
159
159
 
@@ -204,7 +204,7 @@ StructuredDocument.prototype.autoTitle = function() {
204
204
 
205
205
 
206
206
 
207
- StructuredDocument.prototype.getText = function( parts ) { //= this.parts ) {
207
+ StructuredDocument.prototype.getText = function( parts = this.parts ) {
208
208
  var str = '' ;
209
209
 
210
210
  for ( let part of parts ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "book-source",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "A lightweight markup language, inspired by Markdown.",
5
5
  "main": "lib/book-source.js",
6
6
  "directories": {
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "array-kit": "^0.2.6",
11
11
  "palette-shade": "^0.1.3",
12
- "string-kit": "^0.18.0"
12
+ "string-kit": "^0.18.2"
13
13
  },
14
14
  "scripts": {
15
15
  "test": "tea-time -R dot"