Skip to content

Commit 2b92321

Browse files
committed
Display text passed to @deprecated tag. Fixes jsdoc2md/jsdoc-to-markdown#90
1 parent 61db3f0 commit 2b92321

File tree

5 files changed

+11
-25
lines changed

5 files changed

+11
-25
lines changed

helpers/helpers.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ exports.inlineLinks = inlineLinks
1212
exports.tableHead = tableHead
1313
exports.tableHeadHtml = tableHeadHtml
1414
exports.tableRow = tableRow
15-
exports.deprecated = deprecated
1615
exports.groupBy = groupBy
1716
exports._groupBy = _groupBy
1817
exports._addGroup = _addGroup
@@ -150,21 +149,6 @@ function tableHeadHtml () {
150149
return colHeaders
151150
}
152151

153-
function deprecated (options) {
154-
if (this.deprecated) {
155-
if (ddata.optionEquals('no-gfm', true, options) || options.hash['no-gfm']) {
156-
return '<del>' + options.fn(this) + '</del>'
157-
} else {
158-
return '~~' + options.fn(this) + '~~'
159-
}
160-
} else {
161-
return options.fn(this)
162-
}
163-
}
164-
165-
/**
166-
167-
*/
168152
function groupBy (groupByFields, options) {
169153
groupByFields = arrayify(groupByFields)
170154
return handlebars.helpers.each(_groupChildren.call(this, groupByFields, options), options)

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"dependencies": {
3030
"array-back": "^6.2.2",
3131
"cache-point": "^3.0.0",
32-
"common-sequence": "^2.0.2",
32+
"common-sequence": "^3.0.0",
3333
"file-set": "^5.2.2",
3434
"handlebars": "^4.7.8",
3535
"marked": "^4.3.0",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{{#if deprecated}}***Deprecated***
1+
{{#if deprecated}}{{#if (equal deprecated true)}}***Deprecated***{{else}}***{{deprecated}}***{{/if}}
22

3-
{{/if~}}
3+
{{/if~}}

partials/partial-cache.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ module.exports = [
7474
],
7575
[
7676
'deprecated',
77-
'{{#if deprecated}}***Deprecated***\n\n{{/if~}}'
77+
'{{#if deprecated}}{{#if (equal deprecated true)}}***Deprecated***{{else}}***{{deprecated}}***{{/if}}\n' +
78+
'\n' +
79+
'{{/if~}}\n'
7880
],
7981
[
8082
'description',

0 commit comments

Comments
 (0)