Skip to content
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

Case-insensitive patterns in Syntax file #3829

Closed
mc-butler opened this issue Jun 15, 2017 · 9 comments
Closed

Case-insensitive patterns in Syntax file #3829

mc-butler opened this issue Jun 15, 2017 · 9 comments
Assignees
Labels
area: mcedit mcedit, the built-in text editor prio: low Minor problem or easily worked around
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3829
Reporter andrew_b (@aborodin)

Like mc.ext (#2250), Syntax should support case-insensitive file name patterns.

file/i ..\*\\.php[0-9]?$ PHP\sProgram
include php.syntax

instead of

file ..\*\\.(php|PHP)[0-9]?$ PHP\sProgram
include php.syntax
@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jun 15, 2017 at 7:34 UTC (comment 1)

I think that's an excellent idea, the current situation is very annoying.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 17, 2017 at 11:09 UTC (comment 2)

Fortunately, PCRE supports case insensitive natively: (?!:...). So we can keep the C source code untouched and modify only Syntax.in file.

file ..\*\\.(php|PHP)[0-9]?$ PHP\sProgram
include php.syntax

can be replaced with

file ..\*\\.(?i:php)[0-9]?$ PHP\sProgram
include php.syntax

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jun 17, 2017 at 12:22 UTC (comment 3)

Awesome!!!11 Good catch ;-)

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 19, 2017 at 7:45 UTC (comment 4)

  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.20
  • Branch state changed from no branch to on review
  • Owner set to andrew_b

Branch: 3829_syntax_case_insense
[3aabbf2bd55f544fa7b81855d40787e0d2c19b6e]

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jun 19, 2017 at 19:04 UTC (comment 5)

I left some comments, but the only important one I think is the missing i for Haskell.

Also, it's "simplify case insensitive patterns."

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 20, 2017 at 6:47 UTC (comment 6)

Some fixes were made.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jun 20, 2017 at 17:44 UTC (comment 7)

  • Branch state changed from on review to approved
  • Votes set to zaytsev

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 21, 2017 at 7:34 UTC (comment 8)

  • Branch state changed from approved to merged
  • Votes changed from zaytsev to committed-master
  • Resolution set to fixed
  • Status changed from accepted to testing

Merged to master: [b88e72e].

git log --pretty=oneline bc961db..b88e72e

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 21, 2017 at 7:37 UTC (comment 9)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcedit mcedit, the built-in text editor prio: low Minor problem or easily worked around
Development

No branches or pull requests

2 participants