Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Oct 21, 2024
1 parent 65638e7 commit 26a33bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export async function extractTypeFromSource(filePath: string): Promise<string> {
// Parse the object literal
const parsedValue = parseObjectLiteral(constValue.slice(1, -1))
const formattedValue = Object.entries(parsedValue)
.map(([key, value]) => ` ${key}: ${value.includes('/') || value.includes('\'') ? `'${value}'` : value}`)
.map(([key, value]) => ` ${key}: ${value.match(/^['"].*['"]$/) ? value : `'${value}'`}`)
.join(',\n')

if (pendingComment) {
Expand Down

0 comments on commit 26a33bb

Please # to comment.