Comments (2)
Yes, this is related to the JavaScript.sublime-syntax
file in https://github.com/sublimehq/Packages/ which contains a regular expression that syntect
can not parse. I have already addressed this upstream (trishume/syntect#156) and opened a pull request to fix this in sublimehq/Packages (sublimehq/Packages#1525).
bat
currently ships with a manually-patched version of the JavaScript syntax:
diff --git a/JavaScript/JavaScript.sublime-syntax b/JavaScript/JavaScript.sublime-syntax
index 93a478f..8ebb1d0 100644
--- a/JavaScript/JavaScript.sublime-syntax
+++ b/JavaScript/JavaScript.sublime-syntax
@@ -15,7 +15,7 @@ variables:
identifier: '{{identifier_start}}{{identifier_part}}*{{identifier_break}}'
constant_identifier: '[[:upper:]]{{identifier_part}}*{{identifier_break}}'
dollar_only_identifier: '\${{identifier_break}}'
- dollar_identifier: '(\$){{identifier_part}}*{{identifier_break}}+'
+ dollar_identifier: '(\$){{identifier_part}}*{{identifier_break}}'
func_lookahead: '\s*(async\s+)?function{{identifier_break}}'
arrow_func_lookahead: '\s*(async\s*)?({{identifier}}|\(([^()]|\([^()]*\))*\))\s*=>'
either_func_lookahead: (?:{{func_lookahead}}|{{arrow_func_lookahead}})
from bat.
This should be fixed, my upstream PR has been merged.
from bat.
Related Issues (20)
- Support for Podman unit files (Quadlet) HOT 2
- Missing Required Dependency openssl HOT 1
- Provide Statically Compiled Binaries for (aarch64|arm64) Linux
- Using `-S` inside `bat` does not chop long lines HOT 5
- Reading shebang HOT 1
- [solved] zsh cygwin - "The file cannot be accessed by the system (os error 1920)", works fine with bash cygwin HOT 2
- winget doesn't find bat package via winget on Windows 11. HOT 2
- Development with VSCode as IDE HOT 4
- What is the `"st"` file? HOT 9
- FR: use paging for non-operational (eg --help) output HOT 2
- How do I make `bat` use `LF` and `^D` on Windows, similar to `cat` on Linux instead of `CRLF` and `^Z`?
- Documentation Enhancement: Include Information on BAT_CONFIG_DIR Environment Variable
- Couldn't find the man page (or build dir) after install from source HOT 2
- Allow turning on and off styles, relative to current settings HOT 2
- Dependabot partially broken or disabled HOT 1
- Zsh tab complete with -l flag is broken
- Syntax request: typst
- Display Garbled on Windows Terminal HOT 2
- Multiple line selection
- `bat` silently quits, rather than reporting an error, if `less` is missing HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bat.