summaryrefslogtreecommitdiff
path: root/js/lib/blocks.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-15 14:17:27 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-15 14:17:27 -0800
commit604c15c301a634a7c237e2336296d2d86d771fcf (patch)
tree4eb045fcf90d614c15290247f66656c49afe81a4 /js/lib/blocks.js
parent8e51ff90c5d6fb2b8c4cec54a77cfd45f7eb8e8f (diff)
Rename sourcepos -> _sourcepos, added sourcepos() accessor.
Diffstat (limited to 'js/lib/blocks.js')
-rw-r--r--js/lib/blocks.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js
index 0224f74..d5ad49e 100644
--- a/js/lib/blocks.js
+++ b/js/lib/blocks.js
@@ -432,7 +432,7 @@ var incorporateLine = function(ln) {
((match = ln.slice(offset).match(reSetextHeaderLine)))) {
// setext header line
allClosed = allClosed || this.closeUnmatchedBlocks();
- var header = new Node('Header', container.sourcepos);
+ var header = new Node('Header', container.sourcepos());
header.level = match[0][0] === '=' ? 1 : 2;
header.strings = container.strings;
container.insertAfter(header);
@@ -510,7 +510,7 @@ var incorporateLine = function(ln) {
(t === 'CodeBlock' && container.fence_length > 0) ||
(t === 'Item' &&
!container.firstChild &&
- container.sourcepos[0][0] === this.lineNumber));
+ container.sourcepos()[0][0] === this.lineNumber));
var cont = container;
while (cont.parent) {
@@ -573,7 +573,7 @@ var finalize = function(block, lineNumber) {
return 0;
}
block.open = false;
- block.sourcepos[1] = [lineNumber, this.lastLineLength + 1];
+ block.sourcepos()[1] = [lineNumber, this.lastLineLength + 1];
switch (block.type()) {
case 'Paragraph':