Compare commits

...

4 Commits

Author SHA1 Message Date
Samy Pessé 16128c7e60 Bump version to 0.5.6 2014-06-24 12:35:13 +02:00
Samy Pessé 8b6a80cffb Fix error when chapters list is empty
Fix GitbookIO/gitbook.io#101 and GitbookIO/gitbook.io#102
2014-06-24 12:34:29 +02:00
Aaron O'Mullan 86f8a9d8fb Remove useless (and bad) sort on progress
Fixes bad ordering of chapters on gitbook.io
2014-06-20 03:40:47 -07:00
Aaron O'Mullan 790dfd601e Add csharp language highlight mapping
Fixes #327
2014-06-18 11:26:50 -07:00
4 changed files with 8 additions and 8 deletions
-3
View File
@@ -11,9 +11,6 @@ var calculProgress = function(navigation, current) {
nav.path = path;
return nav;
})
.sortBy(function(nav) {
return parseFloat(nav.level);
})
.map(function(nav, i) {
// Calcul percent
nav.percent = (i * 100) / Math.max((n - 1), 1);
+6 -4
View File
@@ -100,11 +100,13 @@ function parseChapter(nodes, nums) {
function defaultChapterList(chapterList) {
var first = _.first(chapterList);
var chapter = parseChapter(first, [0]);
if (first) {
var chapter = parseChapter(first, [0]);
// Already have README node, we're good to go
if(chapter.path === 'README.md') {
return chapterList;
// Already have README node, we're good to go
if(chapter.path === 'README.md') {
return chapterList;
}
}
return [
+1
View File
@@ -2,6 +2,7 @@ var MAP = {
'py': 'python',
'js': 'javascript',
'rb': 'ruby',
'csharp': 'cs',
};
function normalize(lang) {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "gitbook",
"version": "0.5.5",
"version": "0.5.6",
"homepage": "http://www.gitbook.io/",
"description": "Library and cmd utility to generate GitBooks",
"main": "lib/index.js",