Skip to content

Conversation

@Sobak
Copy link
Collaborator

@Sobak Sobak commented Feb 3, 2024

Remaining:

  • keywords are highlighted even mid-sentence (see line 19 in token snapshot)
  • integers should not be highlighted in some contexts (see e.g. first line in token snapshot)
  • failing tests in this PR?

As for 0.10.0, I propose to merge this PR to master (eventually), then to branch off with 0.9.x and then we can continue 0.10.x development on master.

I can even take care of porting changes back and forth, if that ever becomes a necessity because I feel like 0.9.x would be getting just bugfixes and/or new languages, not the bigger changes anyways.

@Sobak Sobak requested a review from kadet1090 February 3, 2024 14:33
@Sobak Sobak force-pushed the feature/lang-dockerfile branch 2 times, most recently from 3888dc8 to d6bc835 Compare February 4, 2024 00:14
];

$this->rules->add('keyword', new Rule(
new RegexMatcher('/^\s*\b(' . implode('|', $keywords) . ')\b/mi'),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if that \b is required since it must be first word of a line? The same goes for the last one - it should probably be \s as I don't think that syntax like RUN["test"] is a valid one? Not sure however.

{
return [
'name' => ['dockerfile'],
'extension' => ['Dockerfile'],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use also other common formats like *.Dockerfile, *-Dockerfile, Dockerfile-*.

Comment on lines 20 to 22
private $_languageOverrides = [
'*.Dockerfile' => 'dockerfile',
];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only ensures me that it should be simply in extensions metadata because it just feels hacky.

@Sobak Sobak force-pushed the feature/lang-dockerfile branch from d6bc835 to e47f902 Compare February 4, 2024 20:01
@Sobak Sobak force-pushed the feature/lang-dockerfile branch from e47f902 to 9fc94ef Compare February 5, 2024 02:43
@Sobak Sobak requested a review from kadet1090 February 10, 2024 22:41
@Sobak Sobak marked this pull request as ready for review February 11, 2024 09:06
@Sobak Sobak mentioned this pull request Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants