Add tm_scope to the BlobHelper

This commit is contained in:
Vicent Marti
2014-10-13 16:14:33 +02:00
parent 6e872c11b6
commit 7dcc3b3edf

View File

@@ -321,6 +321,11 @@ module Linguist
language ? language.lexer : Pygments::Lexer.find_by_name('Text only')
end
# Internal: Get the TextMate compatible scope for the blob
def tm_scope
language && language.tm_scope
end
# Public: Highlight syntax of blob
#
# options - A Hash of options (defaults to {})