summaryrefslogtreecommitdiffstats
path: root/lib/parse/page.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parse/page.js')
-rw-r--r--lib/parse/page.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/parse/page.js b/lib/parse/page.js
index 559be91..56a9e60 100644
--- a/lib/parse/page.js
+++ b/lib/parse/page.js
@@ -42,9 +42,6 @@ function parsePage(src, options) {
// Lex if not already lexed
return (_.isArray(src) ? src : lex(src))
.map(function(section) {
- // Generate a uniqueId to identify this section in our code
- var id = _.uniqueId('gitbook_');
-
// Transform given type
if(section.type === 'exercise') {
var nonCodeNodes = _.reject(section, {
@@ -67,7 +64,7 @@ function parsePage(src, options) {
var lang = validLangs ? langs[0] : null;
return {
- id: id,
+ id: section.id,
type: section.type,
content: render(nonCodeNodes),
lang: lang,
@@ -81,7 +78,7 @@ function parsePage(src, options) {
// Render normal pages
return {
- id: id,
+ id: section.id,
type: section.type,
content: render(section, options)
};