Skip to content

Commit

Permalink
fix(compiler): Properly parse single-line doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Feb 6, 2024
1 parent ba04aaf commit f4654c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/compiler/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function makeRange(start: Token, stop?: Token) {
}

export function cleanDoc(doc: Token | undefined): string | undefined {
return doc?.text?.replace(/^\/\*\*\n?|^\s*\*(?: |\/$)?/gm, '');
return doc?.text?.replace(/^\/\*\*\n?|^\s*\* ?|\s*\*\/$/gm, '');
}

export function compilationUnit(source: string, options?: {
Expand Down

0 comments on commit f4654c5

Please sign in to comment.