mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-07 20:08:48 +00:00
Limit scope of modeline search (#2967)
Only matches the first and last 5 lines against the modeline regular expressions
This commit is contained in:
committed by
Arfon Smith
parent
9ae19a1f94
commit
5c19f1f546
@@ -31,6 +31,7 @@ class TestModelines < Minitest::Test
|
||||
assert_modeline Language["Prolog"], fixture_blob("Data/Modelines/not_perl.pl")
|
||||
assert_modeline Language["Smalltalk"], fixture_blob("Data/Modelines/example_smalltalk.md")
|
||||
assert_modeline Language["PHP"], fixture_blob("Data/Modelines/iamphp.inc")
|
||||
assert_modeline nil, sample_blob("C/main.c")
|
||||
end
|
||||
|
||||
def test_modeline_languages
|
||||
|
||||
Reference in New Issue
Block a user