Merge pull request #819 from github/tell-me-a-story-of-prose

Explicitly mention prose types as `prose`
This commit is contained in:
Ted Nyman
2013-12-08 18:36:18 -08:00
10 changed files with 530 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ module Linguist
@primary_extension_index = {}
# Valid Languages types
TYPES = [:data, :markup, :programming]
TYPES = [:data, :markup, :programming, :prose]
# Names of non-programming languages that we will still detect
#
@@ -35,6 +35,15 @@ module Linguist
["CSS", "Less", "Sass", "TeX"]
end
# Detect languages by a specific type
#
# type - A symbol that exists within TYPES
#
# Returns an array
def self.by_type(type)
all.select { |h| h.type == type }
end
# Internal: Create a new Language object
#
# attributes - A hash of attributes

View File

@@ -23,7 +23,7 @@
# Any additions or modifications (even trivial) should have corresponding
# test change in `test/test_blob.rb`.
#
# Please keep this list alphabetized.
# Please keep this list alphabetized. Capitalization comes before lower case.
ABAP:
type: programming
@@ -103,6 +103,16 @@ Arduino:
lexer: C++
primary_extension: .ino
AsciiDoc:
type: prose
lexer: Text only
ace_mode: asciidoc
wrap: true
primary_extension: .asciidoc
extensions:
- .adoc
- .asc
Assembly:
type: programming
lexer: NASM
@@ -364,6 +374,12 @@ Cpp-ObjDump:
- .c++objdump
- .cxx-objdump
Creole:
type: prose
lexer: Text only
wrap: true
primary_extension: .creole
Cucumber:
lexer: Gherkin
primary_extension: .feature
@@ -945,7 +961,7 @@ Mako:
- .mao
Markdown:
type: markup
type: prose
lexer: Text only
ace_mode: markdown
wrap: true
@@ -976,6 +992,12 @@ Max:
- .mxt
- .pat
MediaWiki:
type: prose
lexer: Text only
wrap: true
primary_extension: .mediawiki
MiniD: # Legacy
searchable: false
primary_extension: .minid # Dummy extension
@@ -1111,6 +1133,12 @@ OpenEdge ABL:
- abl
primary_extension: .p
Org:
type: prose
lexer: Text only
wrap: true
primary_extension: .org
Oxygene:
type: programming
lexer: Text only
@@ -1280,6 +1308,13 @@ R:
interpreters:
- Rscript
RDoc:
type: prose
lexer: Text only
ace_mode: rdoc
wrap: true
primary_extension: .rdoc
REALbasic:
type: programming
lexer: VB.net
@@ -1537,7 +1572,7 @@ Tea:
primary_extension: .tea
Textile:
type: markup
type: prose
lexer: Text only
ace_mode: textile
wrap: true
@@ -1780,7 +1815,7 @@ ooc:
primary_extension: .ooc
reStructuredText:
type: markup
type: prose
wrap: true
search_term: rst
aliases: