github/linguist — pull request #1817 by pchaigno (2014-12-03 15:25:38+00:00)
Title: Fix .fs heuristic

This PR should fix the heuristics for F# and GLSL.
After verification it appears that there can be white spaces between the beginning of the line and the keywords we use in the heurisitics.
I also added a test file to test this fix.

This heuristic was added in #1758.
@larsbrinkhoff Do you know if `:` and `new-device` for Forth also need to be the first characters of the line?

@bkeepers @arfon I also found a strange bug that may be related to the way Ruby handles regexes. If the keyword we try to match is the first keyword of the file, `match()` returns false. For example if we only had the `namespace` keyword for F# it would fail when run on the sample [`Combinators.fs`](https://github.com/pchaigno/linguist/blob/fix-fs-heuristic/samples/F%23/Combinators.fs) (which starts with a `namespace` keyword).