mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Butcher whitespace to appease tab-hating heretics
This commit is contained in:
@@ -4,7 +4,6 @@ require "linguist"
|
||||
require "json"
|
||||
require "yaml"
|
||||
|
||||
|
||||
class GrammarList
|
||||
|
||||
ROOT = File.expand_path "../../", __FILE__
|
||||
@@ -15,7 +14,6 @@ class GrammarList
|
||||
@language_names = load_languages()
|
||||
end
|
||||
|
||||
|
||||
# Load .gitmodules
|
||||
def load_submodules
|
||||
submodules = {}
|
||||
@@ -32,7 +30,6 @@ class GrammarList
|
||||
submodules
|
||||
end
|
||||
|
||||
|
||||
# Grab the name of each language, sorted case-insensitively
|
||||
def load_languages
|
||||
Linguist::Language.all.map(&:name).sort do |a, b|
|
||||
@@ -40,7 +37,6 @@ class GrammarList
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Load grammars.yml
|
||||
def load_sources
|
||||
sources = {}
|
||||
@@ -51,7 +47,6 @@ class GrammarList
|
||||
sources
|
||||
end
|
||||
|
||||
|
||||
# Shorten a repository URL
|
||||
def shorten(url)
|
||||
if url =~ /^https?:\/\/(?:www\.)?github\.com\/([^\/]+\/[^\/]+)/i
|
||||
@@ -63,7 +58,6 @@ class GrammarList
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Markdown: Generate grammar list
|
||||
def to_markdown
|
||||
markdown = ""
|
||||
@@ -94,7 +88,6 @@ class GrammarList
|
||||
markdown
|
||||
end
|
||||
|
||||
|
||||
# Update the file displaying the reader-friendly list of grammar repos
|
||||
def update_readme
|
||||
readme = "#{ROOT}/vendor/README.md"
|
||||
@@ -104,6 +97,5 @@ class GrammarList
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
list = GrammarList.new
|
||||
puts list.update_readme()
|
||||
|
||||
Reference in New Issue
Block a user