-
-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shellsession
language not highlighting first command
#616
Comments
shellsession
highlighting not highlighting first commandshellsession
language not highlighting first command
For more context, here is the Playground highlighting the examples from above using the As can be seen, the syntax highlighting doesn't match with the highlighting after |
I have the same issue. Using { content: 'user@test$', offset: 0, color: '#569CD6', fontStyle: 0 }
{ content: ' echo -n ', offset: 10, color: '#CCCCCC', fontStyle: 0 }
{ content: '$EDITOR', offset: 19, color: '#9CDCFE', fontStyle: 0 }
{ content: ' ', offset: 26, color: '#CCCCCC', fontStyle: 0 }
{ content: '|', offset: 27, color: '#D4D4D4', fontStyle: 0 }
{ content: ' ', offset: 28, color: '#CCCCCC', fontStyle: 0 }
{ content: 'grep', offset: 29, color: '#DCDCAA', fontStyle: 0 }
{ content: ' ', offset: 33, color: '#CCCCCC', fontStyle: 0 }
{ content: '-E', offset: 34, color: '#569CD6', fontStyle: 0 }
{ content: ' ', offset: 36, color: '#CCCCCC', fontStyle: 0 }
{ content: '"vim"', offset: 37, color: '#CE9178', fontStyle: 0 } |
Thanks for investigating @Robot-Inventor! In that case it's a grammar issue but not Shiki's, please report upstream. Once it get fixed upstream, Shiki will sync them back automatically. |
Validations
Describe the bug
When using the syntax highlighter
shellsession
, the first bash command on the line is inconsistently formatted, compared to subsequent commands. This can be seen directly in the Playground by using a command such as:As seen in this screenshot,
![image](https://private-user-images.githubusercontent.com/18218761/311388988-f875538b-f516-41e7-9934-5c5421637c99.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxNjAzMDEsIm5iZiI6MTcyMDE2MDAwMSwicGF0aCI6Ii8xODIxODc2MS8zMTEzODg5ODgtZjg3NTUzOGItZjUxNi00MWU3LTk5MzQtNWM1NDIxNjM3Yzk5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA1VDA2MTMyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkzYzYxY2E3YjlhZDc3MmJlNDVkYjQ2OTQxNmYyNzBlNzVlOWE4NWNhOGE0MjVlOGEwMjBmZmZmNDAyNDBkOWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HLFCi9BS927mrdLHEI14cqGjutpBckdRj_bj92jRmo4)
grep
and-E
are stylized, whilecat
and-n
are not:Here is another example with
![image](https://private-user-images.githubusercontent.com/18218761/311389082-ac80b478-f3e9-49e5-b477-71f0e34d9e11.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxNjAzMDEsIm5iZiI6MTcyMDE2MDAwMSwicGF0aCI6Ii8xODIxODc2MS8zMTEzODkwODItYWM4MGI0NzgtZjNlOS00OWU1LWI0NzctNzFmMGUzNGQ5ZTExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA1VDA2MTMyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2OTlhZDhiNzdiYzNhODE3NjQ2ZmZlYWVlNjYwNzdlYWM0ZjhhODIxNjhiN2U5NTFkNDUyYjBlMmU2MTI2OGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KyxS_4_HqvwRvk3sM-EU9Lg6tc7i4lcdXuDkz3mMCAU)
;
instead of|
:Reproduction
Type a compound command with e.g.
|
or;
using theshellsession
language in the PlaygroundContributes
The text was updated successfully, but these errors were encountered: