mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add Langauge#escaped_name
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
require 'yaml'
|
||||
require 'pygments'
|
||||
require 'uri'
|
||||
require 'yaml'
|
||||
|
||||
module Linguist
|
||||
# Language names that are recognizable by GitHub. Defined languages
|
||||
@@ -322,6 +323,19 @@ module Linguist
|
||||
# Returns the extensions Array
|
||||
attr_reader :filenames
|
||||
|
||||
# Public: Get URL escaped name.
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# "C%23"
|
||||
# "C%2B%2B"
|
||||
# "Common%20Lisp"
|
||||
#
|
||||
# Returns the escaped String.
|
||||
def escaped_name
|
||||
URI.escape(name)
|
||||
end
|
||||
|
||||
# Internal: Get default alias name
|
||||
#
|
||||
# Returns the alias name String
|
||||
|
||||
Reference in New Issue
Block a user