-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[FilePreview] Use syntax highlighting for .srt
#35651
base: main
Are you sure you want to change the base?
Conversation
What color? Can we instead color it white? Then it is more clear what is used as sub title.
|
You might look at this: This page contains additional sytax that you currently not support in your PR. Edited at 30. October 2024 00:08 AM. |
Yes, it does contain the following syntax that I don't support:
I'm aware of this, but I have decided not to support these features for a reason:
|
I am working on this |
You know the test page? |
Yeah, I do, that's where I did most of my testing. Thanks for making sure |
Wondering if we should format in the text only the tags instead of memic the format. This would help with the font tag problem. We could use a lighter color or make it italic. Then you can see that it is a valid tag or not. |
Hi @htcfreek, I apologize for not responding sooner, I was unexpectedly offline for some time :( |
Hi @PesBandi . So instead of making the text underlined, italic and bold we can make the following parts italic: |
So make the tags |
yes. That is how I would do it. |
@htcfreek, I did it that way and now it looks like this |
Maybe combine with different color. Maybe declare it as |
@htcfreek, this is what that would look like |
Feels a bit to much different colors. What do you think? |
@htcfreek like this? |
Summary of the Pull Request
Adds syntax highlighting to
.srt
preview (Peek and Preview Pane).PR Checklist
.srt
#35152Detailed Description of the Pull Request / Additional comments
srt
fromtxtExt
and registers it as a new languagecustomTokenColors
tocustomTokenThemeRules
number
identifier.type
string
<b>
,<i>
...) tokenized astag
HH:mm:ss,mmm
format are considered valid, even though something like00:123:01,1234 --> 00:00:02,000
is technically valid and would get interpreted as02:03:02,234 --> 1193:02:49,296
(I have no idea what's going on)Screenshot:
Validation Steps Performed
Tested previewing srt files with Peek and Preview Pane. Monarch definition tested for edge cases.