-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
I've encountered an issue where the code highlight colouring falls apart once it encounters destructuring in TypeScript code blocks.
My solution is to just comment out the destructuring to correctly highlight the remaining code. While this is a niche case it would be great for rehype-pretty-code to support this :)
Here is the code blog which is causing issues, attached after is some screenshots of what rehype-pretty-code colours them as
private async handleSaveMyBusStopQuestion(
question: SaveMyBusStopQuestion,
): Promise<Result<SaveMyBusStopAnswer, Error>> {
// Destructuring isn't highlighting correctly :(
const [persistentState, stopRes] = await Promise.all([
question.persistentState,
this.edge.getStop(question.userStopId, Optional.none()),
]);
if (stopRes.err) return stopRes;
persistentState.mutate((pState) => {
pState.userStop = stopRes.val;
});
return Ok(new SaveMyBusStopAnswer(stopRes.val));
}
Metadata
Metadata
Assignees
Labels
No labels