summaryrefslogtreecommitdiffstats
path: root/lib/models
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-06-07 12:31:21 +0200
committerSamy Pessé <samypesse@gmail.com>2016-06-07 12:31:21 +0200
commitca70c934d6a92f12e0f826cd3f6f32d562f66b2f (patch)
treed28e83efdca7983d128a59b603aee47314243c1b /lib/models
parent1cc48fa314782312883af00cf64a56929b62f057 (diff)
downloadgitbook-ca70c934d6a92f12e0f826cd3f6f32d562f66b2f.zip
gitbook-ca70c934d6a92f12e0f826cd3f6f32d562f66b2f.tar.gz
gitbook-ca70c934d6a92f12e0f826cd3f6f32d562f66b2f.tar.bz2
Split page parsing into parsePageFromString and parsePage
Add tests for parsePageFromString
Diffstat (limited to 'lib/models')
-rw-r--r--lib/models/page.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/models/page.js b/lib/models/page.js
index ffb9601..1b0e9f8 100644
--- a/lib/models/page.js
+++ b/lib/models/page.js
@@ -32,19 +32,17 @@ Page.prototype.getDir = function() {
};
/**
- Return path of the page
-
- @return {String}
+ * Return path of the page
+ * @return {String}
*/
Page.prototype.getPath = function() {
return this.getFile().getPath();
};
/**
- Create a page for a file
-
- @param {File} file
- @return {Page}
+ * Create a page for a file
+ * @param {File} file
+ * @return {Page}
*/
Page.createForFile = function(file) {
return new Page({