summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-html/lib/langs.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gitbook-html/lib/langs.js')
-rwxr-xr-xpackages/gitbook-html/lib/langs.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/gitbook-html/lib/langs.js b/packages/gitbook-html/lib/langs.js
index d337e0f..a06d3ee 100755
--- a/packages/gitbook-html/lib/langs.js
+++ b/packages/gitbook-html/lib/langs.js
@@ -1,10 +1,18 @@
var _ = require('lodash');
var parseSummary = require('./summary');
-// HTML -> Languages
+/**
+ Parse an HTML content into a list of language
+
+ @param {String} html
+ @return {Array}
+*/
function parseLangs(content) {
var parts = parseSummary(content).parts;
- if (parts.length > 0) return parts[0].articles;
+ if (parts.length > 0) {
+ return parts[0].articles;
+ }
+
return [];
}