Skip to content

Commit

Permalink
Merge pull request #775 from danielberkompas/fix-elixir-markdown-docs
Browse files Browse the repository at this point in the history
Highlight Elixir string markdown header correctly
  • Loading branch information
Golmote committed Sep 22, 2015
2 parents 211a41c + 220f1df commit 2e637f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions components/prism-elixir.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Prism.languages.elixir = {
// Negative look-ahead is needed for string interpolation
'comment': /#(?!\{).*/,
// Negative look-behind is needed to avoid highlighting markdown headers in
// multi-line doc strings
'comment': {
pattern: /([^#])#(?![{#]).*/,
lookbehind: true
},
// ~r"""foo""", ~r'''foo''', ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r<foo>
'regex': /~[rR](?:("""|'''|[\/|"'])(?:\\.|(?!\1)[^\\])+\1|\((?:\\\)|[^)])+\)|\[(?:\\\]|[^\]])+\]|\{(?:\\\}|[^}])+\}|<(?:\\>|[^>])+>)[uismxfr]*/,
'string': [
Expand Down Expand Up @@ -81,4 +86,5 @@ Prism.languages.elixir.string.forEach(function(o) {
}
}
};
});
});

2 changes: 1 addition & 1 deletion components/prism-elixir.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2e637f0

Please sign in to comment.