Skip to content

Commit 36fdaf4

Browse files
committed
Fixed a small issue with displayed path, sometimes adding an extra slash
1 parent 545681d commit 36fdaf4

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

CHANGELOG.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
# Changelog
22

3+
## 1.1.1
4+
5+
* Fixed a small issue with display path, sometimes adding an extra slash ([#68](https://github.com/SassDoc/sassdoc/issues/68))
6+
37
## 1.1.0
48

59
* New design
6-
* Improved the `@requires` annotation to support external vendors, and custom URL
7-
* Added a search engine to the generated documentation
8-
* Fixed an issue with `@link` not working correctly
10+
* Improved the `@requires` annotation to support external vendors, and custom URL ([#61](https://github.com/SassDoc/sassdoc/issues/61))
11+
* Added a search engine to the generated documentation ([#46](https://github.com/SassDoc/sassdoc/issues/46))
12+
* Fixed an issue with `@link` not working correctly ([#108](https://github.com/SassDoc/sassdoc/issues/108))
913
* Added `examples` to `.gitignore`
1014

1115
## 1.0.2
1216

13-
* Fixed an issue with config path resolving to false
17+
* Fixed an issue with config path resolving to false ([#68](https://github.com/SassDoc/sassdoc/issues/68))
1418

1519
## 1.0.1
1620

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{ "name": "Valérian Galliat", "url": "https://twitter.com/valeriangalliat" },
88
{ "name": "Pascal Duez", "url": "https://twitter.com/pascalduez" }
99
],
10-
"version": "1.1.0",
10+
"version": "1.1.1",
1111
"license": {
1212
"type": "MIT",
1313
"url": "http://opensource.org/licenses/MIT"

src/utils.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
var path = require('path');
4+
35
exports = module.exports = {
46

57
/**
@@ -8,7 +10,7 @@ exports = module.exports = {
810
* @return {string} extension
911
*/
1012
getExtension: function (filename) {
11-
return filename.split('.').pop().toLowerCase();
13+
return path.extname(filename).substr(1);
1214
},
1315

1416
/**
@@ -18,7 +20,7 @@ exports = module.exports = {
1820
* @return {string} display path
1921
*/
2022
getDisplayPath: function (filePath, baseDir) {
21-
return filePath.substr(filePath.indexOf(baseDir));
23+
return path.join(baseDir, filePath);
2224
},
2325

2426
/**
@@ -48,15 +50,6 @@ exports = module.exports = {
4850
return (value < 10 ? '0' : '') + value;
4951
},
5052

51-
/**
52-
* Remove leading comment symbols from a line
53-
* @param {string} line - line to be purged
54-
* @return {string} new line
55-
*/
56-
uncomment: function (line) {
57-
return line.trim().replace(/^\/{2,}/i, '').replace(/^\/?\*+\/?/i, '').trim();
58-
},
59-
6053
/**
6154
* Returns whether a value is set or not
6255
* @param {*} value - value to check

0 commit comments

Comments
 (0)