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

Limit scope of modeline search #2967

Merged
merged 1 commit into from May 5, 2016

Conversation

pchaigno
Copy link
Contributor

This pull request limits the scope of the modeline search on files, as discussed in #2942.
It now only matches the first and last 5 lines against the modeline regular expressions.

Fixes #2942.

*
* Author: John Ellis
*
* This software is released under the GNU General Public License (GNU GPL).
Copy link
Contributor

Choose a reason for hiding this comment

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

Any chance you can find a non-GPL example @pchaigno?

Copy link
Collaborator

@Alhadis Alhadis May 5, 2016

Choose a reason for hiding this comment

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

Found one! :D Or rather, edited one, after having cleaned up Google's crap code style.

GitHub:  1
   GPL:  0

I AM THE THORN IN THE ARSE OF RICHARD STALLMAN.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Alhadis Thanks! I've updated the pull request with this sample.

Only matches the first and last 5 lines against the modeline regular expressions
@arfon arfon merged commit 5c19f1f into github-linguist:master May 5, 2016
@arfon
Copy link
Contributor

arfon commented May 5, 2016

👍 thanks both.

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.

None yet

3 participants