summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/parse/lex.js4
-rw-r--r--lib/parse/page.js5
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/parse/lex.js b/lib/parse/lex.js
index 17eab69..852d4e0 100644
--- a/lib/parse/lex.js
+++ b/lib/parse/lex.js
@@ -118,6 +118,10 @@ function lexPage(src) {
return sections;
}, [])
+ .map(function(section) {
+ section.links = nodes.links;
+ return section;
+ })
.value();
}
diff --git a/lib/parse/page.js b/lib/parse/page.js
index 6cfd3ca..2db4476 100644
--- a/lib/parse/page.js
+++ b/lib/parse/page.js
@@ -12,10 +12,9 @@ var lnormalize = require('../utils/lang').normalize;
// Render a section using our custom renderer
function render(section, _options) {
// Copy section
+ var links = section.links || {};
section = _.toArray(section);
-
- // marked's Render expects this, we don't use it yet
- section.links = {};
+ section.links = links;
// Build options using defaults and our custom renderer
var options = _.extend({}, marked.defaults, {