From 7dcc3b3edf2ce09be2b53335ca78c87a58168753 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Mon, 13 Oct 2014 16:14:33 +0200 Subject: [PATCH] Add `tm_scope` to the BlobHelper --- lib/linguist/blob_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index 84aa2281..840ca75c 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -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 {})