summaryrefslogtreecommitdiffstats
path: root/lib/parse
diff options
context:
space:
mode:
authorMatteo Ronchi <matteo.ronchi@gmail.com>2014-05-08 22:46:53 +0200
committerMatteo Ronchi <matteo.ronchi@gmail.com>2014-05-08 22:46:53 +0200
commit2e22fae52ac623d16322a63375198f3d76ad730f (patch)
tree951c60d3f13dde6aa2b1cc9a1d68b9b866b0ca66 /lib/parse
parent603ac8b91da891305b52617978543c1a11ebf294 (diff)
downloadgitbook-2e22fae52ac623d16322a63375198f3d76ad730f.zip
gitbook-2e22fae52ac623d16322a63375198f3d76ad730f.tar.gz
gitbook-2e22fae52ac623d16322a63375198f3d76ad730f.tar.bz2
Force forward slashes on SUMMARY.md paths
this prevent windows user to generate invalid path on unix OS Reference to issue #39 on gitbook-editor
Diffstat (limited to 'lib/parse')
-rw-r--r--lib/parse/summary.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/parse/summary.js b/lib/parse/summary.js
index 7725b59..af13088 100644
--- a/lib/parse/summary.js
+++ b/lib/parse/summary.js
@@ -82,7 +82,7 @@ function parseTitle(src, nums) {
level: level,
// Replace .md references with .html
- path: matches[2],
+ path: matches[2].replace(/\\/g, '/'),
};
}