chroma
chroma copied to clipboard
Syntax error for TypeScript generics
Describe the bug
Chroma seems to not understand TypeScript generics with multiple template arguments and/or template arguments using a generic type too.
Consider the following TypeScript code:
export class AuditingRepository<
T extends Entity,
ID,
Relations extends object = {}
> extends DefaultCrudRepository<T, ID, Relations> {
}
Chroma v0.8.2 and Hugo v0.78.2 render the code with a comma (,) characters highlighted in red - perhaps suggesting an error?

To Reproduce
Save the following text to bug.ts.
export class AuditingRepository<
T extends Entity,
ID,
Relations extends object = {}
> extends DefaultCrudRepository<T, ID, Relations> {
}
Run chroma as follows:
chroma -s autumn --html --html-lines --html-lines-table --html-inline-styles bug.ts > bug.html
Open the produced HTML file in a Chromium-based browers. You should see the same output as on my screenshot posted above.