Skip to content

Commit 2616e4e

Browse files
authored
Decode character entities given in descriptions. (#63)
1 parent 8461720 commit 2616e4e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/markup.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ function replaceDescriptionFor(items) {
3636
}
3737

3838
function highlight(description) {
39+
if (description) {
40+
description = description.replace(/&#(\d+);/g, function(match, dec) {
41+
return String.fromCharCode(dec)
42+
})
43+
}
3944
let markedup = removeHLJSPrefix(marked(description))
4045
let $ = cheerio.load(markedup)
4146

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,5 @@
6262
},
6363
"cacheDirectories": [
6464
"tmp"
65-
],
66-
"husky": {
67-
"hooks": {
68-
"pre-commit": "pretty-quick --staged"
69-
}
70-
}
65+
]
7166
}

0 commit comments

Comments
 (0)