Skip to content

Commit 68964e3

Browse files
committed
Merge #136: feat(highlight): integrate highlight.js for improved code highlighting
4fef01a feat(highlight): integrate highlight.js for improved code highlighting (Graeme Byrne) Pull request description: feat(CodeBlock): integrate highlight.js for code syntax highlighting - Added `highlight.js` to the CodeBlock component for syntax highlighting of code snippets. - Imported the `atom-one-dark` theme for code styling. - Implemented a `normalizeIndentation` function to ensure consistent indentation across code blocks by trimming excess spaces. - Introduced a `processCodeForDisplay` function to replace escaped newline characters (`\n`) with actual newlines for better formatting. - Modified the `code` prop to support the updated logic for normalizing and displaying code with syntax highlighting. - Updated the rendering of code content with `hljs.highlight` to highlight the code based on the specified language. These changes improve the readability and appearance of code snippets within the component by leveraging syntax highlighting and indentation normalization as mentioned in [#52](#52). ACKs for top commit: josecelano: ACK 4fef01a Tree-SHA512: 99e43ccf58ab94c6617dad8426a6f3b6de0c6e6f8d49191d3707099a6a0384454b3b8115f5da59ae86130962dafe15a631b4757456dc86e30be25a428a31d095
2 parents fa8a903 + 4fef01a commit 68964e3

27 files changed

+1360
-1253
lines changed

eslint.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ export default [
4949
'no-fallthrough': 'off',
5050
'no-prototype-builtins': 'off',
5151
'no-redeclare': 'off',
52-
'no-extra-boolean-cast': 'off'
52+
'no-extra-boolean-cast': 'off',
53+
'no-misleading-character-class': 'off',
54+
'no-unused-disable': 'off'
5355
},
5456
plugins: {
5557
prettier: eslintPluginPrettier,

0 commit comments

Comments
 (0)