Commit 69bf578
authored
## Description
## Summary
**Fix:** Correct Python syntax highlighting (incl. f-strings) in Monaco.
**Approach:** Integrate TextMate grammar using monaco-editor-textmate +
onigasm.
**Context**
Python strings/f-strings were tokenized incorrectly, producing broken
highlighting.
Addresses UI-1775 by wiring a proper Python TextMate grammar.
**Changes**
**Editor integration:** Loads TextMate grammar only for Python files;
editor stays read-only until grammar init completes and shows a short
loader.
Binary asset: Adds a WASM file;
Performance: One-time load on first Python editor mount; then
browser-cached.
## Linear Ticket
https://linear.app/autokitteh/issue/UI-1775/syntax-coloring-with-comments-in-the-editor
## What type of PR is this? (check all applicable)
- [ ] 💡 (feat) - A new feature (non-breaking change which adds
functionality)
- [ ] 🔄 (refactor) - Code Refactoring - A code change that neither fixes
a bug nor adds a feature
- [x] 🐞 (fix) - Bug Fix (non-breaking change which fixes an issue)
- [ ] 🏎 (perf) - Optimization
- [ ] 📄 (docs) - Documentation - Documentation only changes
- [ ] 📄 (test) - Tests - Adding missing tests or correcting existing
tests
- [ ] 🎨 (style) - Styles - Changes that do not affect the meaning of the
code (white-space, formatting, missing semi-colons, etc)
- [ ] ⚙️ (ci) - Continuous Integrations - Changes to our CI
configuration files and scripts (example scopes: Travis, Circle,
BrowserStack, SauceLabs)
- [ ] ☑️ (chore) - Chores - Other changes that don't modify src or test
files
- [ ] ↩️ (revert) - Reverts - Reverts a previous commit(s).
<!--
For a timely review/response, please avoid force-pushing additional
commits if your PR already received reviews or comments.
Before submitting a Pull Request, please ensure you've done the
following:
- 👷♀️ Create small PRs. In most cases this will be possible.
- ✅ Provide tests for your changes.
- 📝 Use descriptive commit messages (as described below).
- 📗 Update any related documentation and include any relevant
screenshots.
Commit Message Structure (all lower-case):
<type>(optional ticket number): <description>
[optional body]
-->
1 parent 8cd13d2 commit 69bf578
File tree
7 files changed
+4335
-26
lines changed- public
- grammars
- src
- components/organisms
- lib/monaco
- locales/en/errors
7 files changed
+4335
-26
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
0 commit comments