Skip to content

Commit

Permalink
Added Elixir support.
Browse files Browse the repository at this point in the history
  • Loading branch information
rottmann committed Dec 14, 2015
1 parent 946abb5 commit ffcb6dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var SPECIFICATION_VERSION = '0.2.0';

var defaults = {
excludeFilters: [],
includeFilters: [ '.*\\.(clj|coffee|cs|dart|erl|go|java|js|litcoffee|php?|py|rb|scala|ts|pm)$' ],
includeFilters: [ '.*\\.(clj|coffee|cs|dart|erl|exs?|go|java|js|litcoffee|php?|py|rb|scala|ts|pm)$' ],

src: path.join(__dirname, '../example/'),

Expand Down Expand Up @@ -46,6 +46,8 @@ var app = {
'.clj' : './languages/clj.js',
'.coffee' : './languages/coffee.js',
'.erl' : './languages/erl.js',
'.ex' : './languages/ex.js',
'.exs' : './languages/ex.js',
'.litcoffee' : './languages/coffee.js',
'.pm' : './languages/pm.js',
'.py' : './languages/py.js',
Expand Down
11 changes: 11 additions & 0 deletions lib/languages/ex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Elixir
*/
module.exports = {
// Find document blocks in heredocs that are arguments of the @apidoc
// module attribute. Elixir heredocs can be enclosed between """ and """ or
// between ''' and '''. Heredocs in ~s and ~S sigils are also supported.
docBlocksRegExp: /@apidoc\s*(~[sS])?("""\uffff?(.+?)\uffff?(?:\s*)?"""|'''\uffff?(.+?)\uffff?(?:\s*)?''')/g,
// Remove not needed tabs at the beginning
inlineRegExp: /^(\t*)?/gm
};

0 comments on commit ffcb6dd

Please sign in to comment.