mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-29 05:29:02 +00:00
In page parser, lex only if not already lexed
This commit is contained in:
+2
-1
@@ -39,7 +39,8 @@ function render(section, _options) {
|
||||
function parsePage(src, options) {
|
||||
options = options || {};
|
||||
|
||||
return lex(src)
|
||||
// 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_');
|
||||
|
||||
Reference in New Issue
Block a user