Conversation
There was a problem hiding this comment.
Review Summary
This PR disables HLJS syntax highlighting and updates the layout max-width from 1024px to 800px. While the changes work correctly, there are dead code issues that should be addressed before merge.
Critical Issues
- Dead Code: Disabling HLJS by emptying
HLJS_LANGSleaves unused imports, registrations, and the entireHLJSCodeBlockcomponent in the bundle, unnecessarily increasing bundle size.
Recommended Actions
Remove all HLJS-related code:
- Lines 7, 9: HLJS imports
- Lines 12-13: Language imports (x86asm, armasm)
- Lines 15-16: Language registrations
- Lines 20-29: HLJSCodeBlock component
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
| HLJSHighlighter.registerLanguage('armasm', armasm); | ||
|
|
||
| const HLJS_LANGS = ['x86asm', 'armasm']; | ||
| const HLJS_LANGS = []; // ['x86asm', 'armasm']; |
There was a problem hiding this comment.
🛑 Dead Code: Remove unused HLJS imports and registrations on lines 7, 9, 12-13, and 15-16. Since HLJS_LANGS is now empty, the HLJSHighlighter import, HLJSStyles import, language imports (x86asm, armasm), and registerLanguage calls serve no purpose and unnecessarily increase bundle size.
| HLJSHighlighter.registerLanguage('armasm', armasm); | ||
|
|
||
| const HLJS_LANGS = ['x86asm', 'armasm']; | ||
| const HLJS_LANGS = []; // ['x86asm', 'armasm']; |
There was a problem hiding this comment.
🛑 Dead Code: Remove the HLJSCodeBlock component on lines 20-29. Since HLJS_LANGS is empty, isHLJS on line 49 will always be false, making this component unreachable and unnecessarily increasing bundle size.
There was a problem hiding this comment.
Code Review
This pull request reduces the maximum width of the application layout to 800px and updates the Markdown renderer's syntax highlighting theme. Feedback was provided regarding the disabling of Highlight.js languages, which currently leaves behind unused imports and dead code that should be removed to optimize the bundle.
| HLJSHighlighter.registerLanguage('armasm', armasm); | ||
|
|
||
| const HLJS_LANGS = ['x86asm', 'armasm']; | ||
| const HLJS_LANGS = []; // ['x86asm', 'armasm']; |
There was a problem hiding this comment.
Emptying HLJS_LANGS effectively disables the feature, but it leaves behind significant dead code, including unused imports (HLJSHighlighter, HLJSStyles, x86asm, armasm), language registrations (lines 15-16), and the HLJSCodeBlock component (lines 20-29). This results in unnecessary code being included in the production bundle. If HLJS is no longer required, consider removing all related logic and dependencies to optimize the application. Additionally, avoid leaving commented-out code in the source.
| const HLJS_LANGS = []; // ['x86asm', 'armasm']; | |
| const HLJS_LANGS = []; |
No description provided.