Skip to content

Commit b5a49f3

Browse files
authored
Merge pull request #425 from skybber/traverse_table
Mark table cell by data-line
2 parents 44fe973 + 70f488b commit b5a49f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

conf/public/js/asciidoctor-data-line.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ Object.prototype._is_nil = function (name) {
99
asciidoctor.Extensions.register(function () {
1010
this.treeProcessor(function () {
1111
const self = this;
12+
const selector = JSON.stringify({
13+
traverse_documents: true
14+
});
1215
self.process(function (parent, reader) {
1316

1417
if (parent._is_nil("apply-data-line"))
1518
return parent;
1619

17-
parent.$find_by().forEach(function (node) {
20+
parent.$find_by(selector).forEach(function (node) {
1821
if (node && node.$source_location) {
1922
if (node.$source_location().lineno) {
2023
var nodeName = node.node_name;
@@ -26,4 +29,4 @@ asciidoctor.Extensions.register(function () {
2629
return parent;
2730
});
2831
});
29-
});
32+
});

0 commit comments

Comments
 (0)