Skip to content

Commit e207478

Browse files
committed
remove quotes from jsdoc member names.. fixes #17
1 parent e7cc93e commit e207478

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![view on npm](http://img.shields.io/npm/v/jsdoc-parse.svg)](https://www.npmjs.org/package/jsdoc-parse)
2-
[![npm module downloads per month](http://img.shields.io/npm/dm/jsdoc-parse.svg)](https://www.npmjs.org/package/jsdoc-parse)
2+
[![npm module downloads](http://img.shields.io/npm/dt/jsdoc-parse.svg)](https://www.npmjs.org/package/jsdoc-parse)
33
[![Build Status](https://travis-ci.org/jsdoc2md/jsdoc-parse.svg?branch=master)](https://travis-ci.org/jsdoc2md/jsdoc-parse)
44
[![Dependency Status](https://david-dm.org/jsdoc2md/jsdoc-parse.svg)](https://david-dm.org/jsdoc2md/jsdoc-parse)
55
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)

jsdoc2md/README.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![view on npm](http://img.shields.io/npm/v/jsdoc-parse.svg)](https://www.npmjs.org/package/jsdoc-parse)
2-
[![npm module downloads per month](http://img.shields.io/npm/dm/jsdoc-parse.svg)](https://www.npmjs.org/package/jsdoc-parse)
2+
[![npm module downloads](http://img.shields.io/npm/dt/jsdoc-parse.svg)](https://www.npmjs.org/package/jsdoc-parse)
33
[![Build Status](https://travis-ci.org/jsdoc2md/jsdoc-parse.svg?branch=master)](https://travis-ci.org/jsdoc2md/jsdoc-parse)
44
[![Dependency Status](https://david-dm.org/jsdoc2md/jsdoc-parse.svg)](https://david-dm.org/jsdoc2md/jsdoc-parse)
55
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)

lib/transform.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,11 @@ function updateIDReferences (identifier, newID) {
193193

194194
/* removes unwanted quotes set by jsdoc if you specifiy a memberof such as `jquery.fn` */
195195
function removeQuotes (identifier) {
196-
if (identifier.name) identifier.name = identifier.name.replace(/"/g, '')
197-
if (identifier.memberof) identifier.memberof = identifier.memberof.replace(/"/g, '')
198-
if (identifier.longname) identifier.longname = identifier.longname.replace(/"/g, '')
199-
if (identifier.id) identifier.id = identifier.id.replace(/"/g, '')
196+
const re = /["']/g
197+
if (identifier.name) identifier.name = identifier.name.replace(re, '')
198+
if (identifier.memberof) identifier.memberof = identifier.memberof.replace(re, '')
199+
if (identifier.longname) identifier.longname = identifier.longname.replace(re, '')
200+
if (identifier.id) identifier.id = identifier.id.replace(re, '')
200201
return identifier
201202
}
202203

0 commit comments

Comments
 (0)