Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.

Commit 110f96e

Browse files
committed
Merge pull request #130 from BYK/issue-87
Fix: Last tag always has \n in the description
2 parents dbc9f28 + fea8db3 commit 110f96e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/doctrine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
index += 1;
160160
}
161161

162-
return result;
162+
return result.replace(/\s+$/, '');
163163
}
164164

165165
// JSDoc Tag Parser

test/unwrap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ require('should');
3333

3434
describe('unwrapComment', function () {
3535
it('normal', function () {
36-
doctrine.unwrapComment('/**\n * @const\n * @const\n */').should.equal('\n@const\n@const\n');
36+
doctrine.unwrapComment('/**\n * @const\n * @const\n */').should.equal('\n@const\n@const');
3737
});
3838

3939
it('single', function () {
@@ -46,15 +46,15 @@ describe('unwrapComment', function () {
4646
});
4747

4848
it('2 lines', function () {
49-
doctrine.unwrapComment('/**x\n * y\n*/').should.equal('x\ny\n');
49+
doctrine.unwrapComment('/**x\n * y\n*/').should.equal('x\ny');
5050
});
5151

5252
it('2 lines with space', function () {
53-
doctrine.unwrapComment('/**x\n * y\n*/').should.equal('x\n y\n');
53+
doctrine.unwrapComment('/**x\n * y\n*/').should.equal('x\n y');
5454
});
5555

5656
it('3 lines with blank line', function () {
57-
doctrine.unwrapComment('/**x\n *\n \* y\n*/').should.equal('x\n\ny\n');
57+
doctrine.unwrapComment('/**x\n *\n \* y\n*/').should.equal('x\n\ny');
5858
});
5959
});
6060
/* vim: set sw=4 ts=4 et tw=80 : */

0 commit comments

Comments
 (0)