Skip to content

Commit

Permalink
Strip long names and descriptions #178
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Jan 23, 2022
1 parent 1ba999d commit ca707bc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ module.exports = {
if (i == c0) {
const names_before = data[i]
const names_after = names_before.slice(8)
names.push(names_after.trim())

if (names_after.length > 40) {
names.push(`${names_after.trim().slice(0, 40)}...`)
} else {
names.push(names_after.trim())
}

c0 = c0 + 4
}

Expand All @@ -60,7 +66,13 @@ module.exports = {
if (i == c2) {
const issuers_before = data[i]
const issuers_after = issuers_before.slice(8)
issuers.push(issuers_after.trim())

if (issuers_after.length > 15) {
issuers.push(`${issuers_after.trim().slice(0, 15)}...`)
} else {
issuers.push(issuers_after.trim())
}

c2 = c2 + 4
}

Expand Down

0 comments on commit ca707bc

Please sign in to comment.