Skip to content

Commit

Permalink
add support for markdown #148
Browse files Browse the repository at this point in the history
  • Loading branch information
o2sh committed Nov 2, 2019
1 parent 1bbc83f commit a698aaa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions resources/markdown.ascii
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{0}####### {1} ,#####. .#####.
{0} ### {1}########.########
{0} ### {1}#################
{0} ### {1}`###############'
{0} ### {1} `#############'
{0} ### {1} `#########'
{0} ### {1} `#####'
{0}####### {1} `#'
{0}
{0}#### #### ###
{0}##### ##### ###
{0}######.###### ###
{0}### ##### ### ###
{0}### ### ### #######
{0}### # ### #####
{0}### ### ###
{0}### ### #
5 changes: 5 additions & 0 deletions src/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub enum Language {
Kotlin,
Lisp,
Lua,
Markdown,
Nim,
ObjectiveC,
Perl,
Expand Down Expand Up @@ -83,6 +84,7 @@ impl std::fmt::Display for Language {
Language::Kotlin => write!(f, "Kotlin"),
Language::Lisp => write!(f, "Lisp"),
Language::Lua => write!(f, "Lua"),
Language::Markdown => write!(f, "Markdown"),
Language::Nim => write!(f, "Nim"),
Language::ObjectiveC => write!(f, "Objective-C"),
Language::PureScript => write!(f, "PureScript"),
Expand Down Expand Up @@ -137,6 +139,7 @@ impl From<tokei::LanguageType> for Language {
tokei::LanguageType::Kotlin => Language::Kotlin,
tokei::LanguageType::Lisp => Language::Lisp,
tokei::LanguageType::Lua => Language::Lua,
tokei::LanguageType::Markdown => Language::Markdown,
tokei::LanguageType::Nim => Language::Nim,
tokei::LanguageType::ObjectiveC => Language::ObjectiveC,
tokei::LanguageType::Prolog => Language::Prolog,
Expand Down Expand Up @@ -190,6 +193,7 @@ impl Language {
Language::Kotlin => include_str!("../resources/kotlin.ascii"),
Language::Lisp => include_str!("../resources/lisp.ascii"),
Language::Lua => include_str!("../resources/lua.ascii"),
Language::Markdown => include_str!("../resources/markdown.ascii"),
Language::Nim => include_str!("../resources/nim.ascii"),
Language::ObjectiveC => include_str!("../resources/objectivec.ascii"),
Language::Perl => include_str!("../resources/perl.ascii"),
Expand Down Expand Up @@ -254,6 +258,7 @@ impl Language {
Language::Kotlin => vec![Color::Blue, Color::Yellow, Color::Magenta],
Language::Lisp => vec![Color::Yellow],
Language::Lua => vec![Color::Blue],
Language::Markdown => vec![Color::BrightWhite, Color::BrightRed],
Language::Nim => vec![Color::Yellow, Color::BrightWhite],
Language::ObjectiveC => vec![Color::BrightBlue, Color::Blue],
Language::Perl => vec![Color::BrightBlue],
Expand Down

0 comments on commit a698aaa

Please sign in to comment.