Skip to content

Commit

Permalink
Add 'proto' syntax highlighting (#381)
Browse files Browse the repository at this point in the history
Closes #381
  • Loading branch information
ReeceHumphreys committed Nov 21, 2023
1 parent e7fcc85 commit b1c6c1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/code-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ export const CodeBlock = ({
}
}, [resolvedTheme]);

// If the user specified `proto` as the language, change it to protobuf
if (language?.toLowerCase() === 'proto') {
language = 'protobuf';
}

// If the code is a slice file, add the mode to the first line if the current
if (language?.toLowerCase() === 'slice' && addMode && mode == Mode.Slice1) {
const modeLines = [`mode = ${mode}`, '\n'];
Expand Down

0 comments on commit b1c6c1e

Please sign in to comment.