changed hex_metadata.config
 
@@ -5,12 +5,13 @@
5
5
{<<"elixir">>,<<"~> 1.0">>}.
6
6
{<<"files">>,
7
7
[<<"lib/makeup.ex">>,<<"lib/makeup/formatter.ex">>,
8
- <<"lib/makeup/formatters/html/simple_html_formatter.ex">>,
8
+ <<"lib/makeup/formatters/html/html_formatter.ex">>,
9
9
<<"lib/makeup/lexer.ex">>,<<"lib/makeup/lexer/common.ex">>,
10
10
<<"lib/makeup/lexer/common/ascii.ex">>,
11
11
<<"lib/makeup/lexer/common/macros.ex">>,
12
12
<<"lib/makeup/lexers/elixir_lexer.ex">>,
13
- <<"lib/makeup/lexers/html5_lexer.ex">>,<<"lib/makeup/styles/html.ex">>,
13
+ <<"lib/makeup/lexers/html5_lexer.ex">>,<<"lib/makeup/pickers.ex">>,
14
+ <<"lib/makeup/styles/html.ex">>,
14
15
<<"lib/makeup/styles/html/pygments/abap.ex">>,
15
16
<<"lib/makeup/styles/html/pygments/algol.ex">>,
16
17
<<"lib/makeup/styles/html/pygments/algol_nu.ex">>,
 
@@ -35,6 +36,7 @@
35
36
<<"lib/makeup/styles/html/pygments/perldoc.ex">>,
36
37
<<"lib/makeup/styles/html/pygments/rainbow_dash.ex">>,
37
38
<<"lib/makeup/styles/html/pygments/rrt.ex">>,
39
+ <<"lib/makeup/styles/html/pygments/samba.ex">>,
38
40
<<"lib/makeup/styles/html/pygments/tango.ex">>,
39
41
<<"lib/makeup/styles/html/pygments/trac.ex">>,
40
42
<<"lib/makeup/styles/html/pygments/vim.ex">>,
 
@@ -66,4 +68,4 @@
66
68
{<<"name">>,<<"html_entities">>},
67
69
{<<"optional">>,false},
68
70
{<<"requirement">>,<<"~> 0.3.0">>}]]}.
69
- {<<"version">>,<<"0.1.1">>}.
71
+ {<<"version">>,<<"0.1.3">>}.
changed lib/makeup.ex
 
@@ -1,20 +1,45 @@
1
1
defmodule Makeup do
2
- alias Makeup.Formatters.HTML.SimpleHTMLFormatter
2
+ alias Makeup.Formatters.HTML.HTMLFormatter
3
3
alias Makeup.Lexers.ElixirLexer
4
-
5
4
alias Makeup.Styles.HTML.StyleMap
5
+ alias Makeup.Styles.HTML.Style
6
+ alias Makeup.Pickers
6
7
require StyleMap
7
8
9
+
8
10
@doc """
9
11
Highlights the given string using the given lexer and formatter.
10
12
11
13
By default it highlight the Elixir language using HTML
12
14
"""
13
- def highlight(source, lexer \\ ElixirLexer, formatter \\ SimpleHTMLFormatter) do
15
+ def highlight(source, options \\ []) do
16
+ lexer = case options[:lexer] do
17
+ nil -> ElixirLexer
18
+ module when is_atom(module) -> module
19
+ name -> Pickers.pick_lexer!(name)
20
+ end
21
+
22
+ formatter = case options[:formatter] do
23
+ nil -> HTMLFormatter
24
+ module when is_atom(module) -> module
25
+ name -> Pickers.pick_lexer!(name)
26
+ end
27
+
14
28
tokens = apply(lexer, :lex, [source])
15
29
apply(formatter, :format, [tokens])
16
30
end
17
31
32
+ def highlight_inner_html(source, options \\ []) do
33
+ lexer = case options[:lexer] do
34
+ nil -> ElixirLexer
35
+ module when is_atom(module) -> module
36
+ name -> Pickers.pick_lexer!(name)
37
+ end
38
+
39
+ tokens = apply(lexer, :lex, [source])
40
+ apply(HTMLFormatter, :format_inner, [tokens])
41
+ end
42
+
18
43
@doc """
19
44
Generates a CSS stylesheet for highlighted code for the given style.
20
45
 
@@ -22,12 +47,14 @@ defmodule Makeup do
22
47
For example, if the `css_class` is `"highlight"` (the default), the stylesheet
23
48
has the form:
24
49
25
- .highlight .someclass {...}
26
- .highlight .anotherclass {...}
27
- ...
50
+ ```css
51
+ .highlight .someclass {...}
52
+ .highlight .anotherclass {...}
53
+ ```
54
+ ...
28
55
"""
29
- def stylesheet(style \\ StyleMap.default, css_class \\ "highlight") do
30
- Makeup.Styles.HTML.Style.stylesheet(style, css_class)
56
+ def stylesheet(style \\ StyleMap.default_style(), css_class \\ "highlight") do
57
+ Style.stylesheet(style, css_class)
31
58
end
32
59
33
60
end
\ No newline at end of file
added lib/makeup/formatters/html/html_formatter.ex
 
@@ -0,0 +1,67 @@
1
+ defmodule Makeup.Formatters.HTML.HTMLFormatter do
2
+
3
+ require EEx
4
+
5
+ EEx.function_from_string(:defp, :render_token, """
6
+ <span\
7
+ <%= if css_class do %> class="<%= css_class %>"<% end %>\
8
+ <%= if meta[:group_id] do %> data-group-id="<%= meta[:group_id] %>"<% end %>\
9
+ ><%= escaped_value %></span>\
10
+ """, [:escaped_value, :css_class, :meta])
11
+
12
+ def format_token({tag, meta, value}) do
13
+ escaped_value = HtmlEntities.encode(value)
14
+ css_class = Makeup.Token.Utils.css_class_for_token_type(tag)
15
+ render_token(escaped_value, css_class, meta)
16
+ end
17
+
18
+ def format_inner(tokens) do
19
+ tokens
20
+ |> Enum.map(&format_token/1)
21
+ |> Enum.join("")
22
+ end
23
+
24
+ def format(tokens, css_class \\ "highlight") do
25
+ inner = format_inner(tokens)
26
+
27
+ """
28
+ <pre class="#{css_class}"><code>#{inner}</code></pre>
29
+ """
30
+ end
31
+
32
+ def stylesheet(style, css_class \\ "highlight") do
33
+ Makeup.Styles.HTML.Style.stylesheet(style, css_class)
34
+ end
35
+
36
+ def group_highlighter_javascript() do
37
+ """
38
+ function makeupProcessMatchingGroups() {
39
+ var HIGHLIGHT_CLASS = "hll";
40
+ function onMouseEnter(evt) {
41
+ var groupId = evt.target.getAttribute("data-group-id");
42
+ siblings = document.querySelectorAll("[data-group-id='" + groupId + "']");
43
+ for (i = 0; i < siblings.length; ++i) {
44
+ siblings[i].classList.add(HIGHLIGHT_CLASS);
45
+ }
46
+ }
47
+
48
+ function onMouseLeave(evt) {
49
+ var groupId = evt.target.getAttribute("data-group-id");
50
+ siblings = document.querySelectorAll("[data-group-id='" + groupId + "']");
51
+ for (i = 0; i < siblings.length; ++i) {
52
+ siblings[i].classList.remove(HIGHLIGHT_CLASS);
53
+ }
54
+ }
55
+
56
+ var delims = document.querySelectorAll("[data-group-id]");
57
+ for(i=0; i < delims.length; i++) {
58
+ var elem = delims[i];
59
+ elem.addEventListener("mouseenter", onMouseEnter);
60
+ elem.addEventListener("mouseleave", onMouseLeave);
61
+ }
62
+ }
63
+
64
+ makeupProcessMatchingGroups();
65
+ """
66
+ end
67
+ end
\ No newline at end of file
removed lib/makeup/formatters/html/simple_html_formatter.ex
 
@@ -1,25 +0,0 @@
1
- defmodule Makeup.Formatters.HTML.SimpleHTMLFormatter do
2
-
3
- def format_token({tag, _meta, value}) do
4
- escaped = HtmlEntities.encode(value)
5
- css_class = Makeup.Token.Utils.css_class_for_token_type(tag)
6
- case css_class do
7
- nil -> "<span>#{escaped}</span>"
8
- css_class -> ~s(<span class="#{css_class}">#{escaped}</span>)
9
- end
10
- end
11
-
12
- def format(tokens, css_class \\ "highlight") do
13
- inner = tokens
14
- |> Enum.map(&format_token/1)
15
- |> Enum.join("")
16
-
17
- """
18
- <pre class="#{css_class}"><code>#{inner}</code></pre>
19
- """
20
- end
21
-
22
- def stylesheet(style, css_class \\ "highlight") do
23
- Makeup.Styles.HTML.Style.stylesheet(style, css_class)
24
- end
25
- end
\ No newline at end of file
changed lib/makeup/lexers/elixir_lexer.ex
 
@@ -14,7 +14,8 @@ defmodule Makeup.Lexers.ElixirLexer do
14
14
15
15
import Makeup.Lexer.Common.ASCII, only: [
16
16
space: 1, spaces1: 1, digits1: 1,
17
- hex_digits1: 1, lowercase_letter_: 1, alphanums_: 1]
17
+ hex_digits1: 1, lowercase_letter_: 1,
18
+ alphanums_: 1, alphanum_: 1]
18
19
19
20
# # Actual lexer
20
21
 
@@ -57,13 +58,15 @@ defmodule Makeup.Lexers.ElixirLexer do
57
58
58
59
defrule interpol(
59
60
seq([
60
- token(lit("\#{"), Tok.string_interpol),
61
- repeat(
62
- lookahead_not(lit("}")) |> root_element()
63
- ),
64
- token(lit("}"), Tok.string_interpol)
61
+ tag(:open,
62
+ token(lit("\#{"), Tok.string_interpol)),
63
+ tag(:middle,
64
+ repeat(
65
+ lookahead_not(lit("}")) |> root_element())),
66
+ tag(:close,
67
+ token(lit("}"), Tok.string_interpol))
65
68
])
66
- )
69
+ ), pipe_result_into: process_delimiter_groups
67
70
68
71
defrule embed_interpol(
69
72
alt([
 
@@ -72,7 +75,6 @@ defmodule Makeup.Lexers.ElixirLexer do
72
75
])
73
76
)
74
77
75
- # Sigils with no interpolation are very simple (once you have the right macro available)
76
78
defrule sigil_no_interpol(
77
79
seq([
78
80
tag(:open,
 
@@ -475,21 +477,196 @@ defmodule Makeup.Lexers.ElixirLexer do
475
477
Tok.comment_single)
476
478
)
477
479
478
- defrule tuple(
479
- seq([
480
- token(lit(?{), Tok.punctuation),
481
- repeat(lookahead_not(lit(?})) |> root_element()),
482
- token(lit(?}), Tok.punctuation)])
480
+ # iex(1)>
481
+ # iex>
482
+ defrule iex_prompt(
483
+ token(
484
+ seq([
485
+ alt([
486
+ lit("iex"),
487
+ lit("...")
488
+ ]),
489
+ repeat(
490
+ seq([
491
+ lit("("),
492
+ digits1(),
493
+ lit(")")
494
+ ]), 0, 1),
495
+ lit(">")]),
496
+ Tok.generic_prompt)
483
497
)
484
498
499
+ # Matching delimiters
500
+ # - parenthesis - ()
501
+ # - tuple: {}
502
+ # - straight brackets - []
503
+ # - binaries - <<>>
504
+ # - map - %{}
505
+ # - struct %Module{}
506
+
507
+ defp process_delimiter_groups([open: open, middle: middle, close: close]) do
508
+ # Generate unique value
509
+ uid = unique_value()
510
+ processed =
511
+ # Mark the opening tag as belonging to the group `uid`
512
+ (open |> List.wrap |> List.flatten |> as_group(uid)) ++
513
+ # No need to anything to the middle part
514
+ middle ++
515
+ # Mark the closing tag as belonging to the group `uid`
516
+ (close |> List.wrap |> List.flatten |> as_group(uid))
517
+ processed
518
+ end
519
+
520
+ defrule tuple(
521
+ seq([
522
+ tag(:open,
523
+ token(lit(?{), Tok.punctuation)
524
+ ),
525
+ tag(:middle,
526
+ repeat(lookahead_not(lit(?})) |> root_element())
527
+ ),
528
+ tag(:close,
529
+ token(lit(?}), Tok.punctuation)
530
+ )
531
+ ])
532
+ ), pipe_result_into: process_delimiter_groups
533
+
534
+
535
+ defrule struct_(
536
+ seq([
537
+ tag(:open,
538
+ seq([
539
+ token(char(?%), Tok.punctuation),
540
+ module_name(),
541
+ token(char(?{), Tok.punctuation)])),
542
+ tag(:middle,
543
+ repeat(lookahead_not(char(?})) |> root_element())),
544
+ tag(:close,
545
+ token(char(?}), Tok.punctuation))
546
+ ])
547
+ ), pipe_result_into: process_delimiter_groups
548
+
549
+
485
550
defrule map(
486
551
seq([
487
- token(lit("%{"), Tok.punctuation),
488
- repeat(lookahead_not(lit("}")) |> root_element()),
489
- token(lit("}"), Tok.punctuation)
552
+ tag(:open,
553
+ token(lit("%{"), Tok.punctuation)),
554
+ tag(:middle,
555
+ repeat(lookahead_not(char(?})) |> root_element())),
556
+ tag(:close,
557
+ token(char(?}), Tok.punctuation))])
558
+ ), pipe_result_into: process_delimiter_groups
559
+
560
+
561
+ defrule parens(
562
+ seq([
563
+ tag(:open,
564
+ token(char(?(), Tok.punctuation)),
565
+ tag(:middle,
566
+ repeat(
567
+ lookahead_not(lit(?))) |> root_element())),
568
+ tag(:close,
569
+ token(char(?)), Tok.punctuation))])
570
+ ), pipe_result_into: process_delimiter_groups
571
+
572
+
573
+ defrule list(
574
+ seq([
575
+ tag(:open,
576
+ token(lit(?[), Tok.punctuation)),
577
+ tag(:middle,
578
+ repeat(lookahead_not(lit(?])) |> root_element())),
579
+ tag(:close,
580
+ token(lit(?]), Tok.punctuation))])
581
+ ), pipe_result_into: process_delimiter_groups
582
+
583
+
584
+ defrule binary(
585
+ seq([
586
+ tag(:open,
587
+ token(lit("<<"), Tok.punctuation)),
588
+ tag(:middle,
589
+ repeat(lookahead_not(lit(">>")) |> root_element())),
590
+ tag(:close,
591
+ token(lit(">>"), Tok.punctuation))])
592
+ ), pipe_result_into: process_delimiter_groups
593
+
594
+
595
+ defrule block_keyword(
596
+ seq([
597
+ alt([
598
+ lit("else"),
599
+ lit("catch"),
600
+ lit("rescue"),
601
+ lit("after"),
602
+ lit("end")
603
+ ]),
604
+ lookahead_not(alphanum_())
490
605
])
491
606
)
492
607
608
+ defrule block_keyword_middle(
609
+ seq([
610
+ alt([
611
+ lit("else"),
612
+ lit("catch"),
613
+ lit("rescue"),
614
+ lit("after")
615
+ ]),
616
+ lookahead_not(alphanum_())
617
+ ])
618
+ )
619
+
620
+ defrule end_keyword(
621
+ lit("end") |> lookahead_not(alphanum_())
622
+ )
623
+
624
+ defrule do_block(
625
+ seq([
626
+ tag(:keyword,
627
+ token(lit("do") |> lookahead_not(alphanum_()), Tok.name)),
628
+ tag(:normal,
629
+ repeat(
630
+ lookahead_not(block_keyword())
631
+ |> root_element(), 1)),
632
+ repeat(
633
+ seq([
634
+ tag(:keyword,
635
+ token(block_keyword_middle(), Tok.name)),
636
+ tag(:normal,
637
+ repeat(
638
+ lookahead_not(block_keyword())
639
+ |> root_element(), 1))
640
+ ])),
641
+ tag(:keyword,
642
+ token(end_keyword(), Tok.name))
643
+ ])
644
+ ), pipe_result_into: process_do_block
645
+
646
+ defp process_do_block(results) do
647
+ uid = unique_value()
648
+ results |> List.flatten |> Enum.map(&tag_do_block_element(&1, uid))
649
+ end
650
+
651
+ defp tag_do_block_element({:keyword, keyword}, uid), do: as_group(keyword, uid)
652
+ defp tag_do_block_element({:normal, toks}, _), do: toks
653
+
654
+
655
+ defrule fn_end(
656
+ seq([
657
+ tag(:open,
658
+ token(lit("fn") |> lookahead_not(alphanum_()), Tok.name)),
659
+ tag(:middle,
660
+ repeat(
661
+ lookahead_not(end_keyword())
662
+ |> root_element(),
663
+ 1)),
664
+ tag(:close,
665
+ token(end_keyword(), Tok.name))
666
+ ])
667
+ ), pipe_result_into: process_delimiter_groups
668
+
669
+
493
670
494
671
defrule any_char(
495
672
token(char(), Tok.error)
 
@@ -505,6 +682,8 @@ defmodule Makeup.Lexers.ElixirLexer do
505
682
whitespace(),
506
683
# Comment
507
684
inline_comment(),
685
+ # iex prompt
686
+ iex_prompt(),
508
687
# Chars
509
688
long_hex_char(),
510
689
hex_char(),
 
@@ -522,12 +701,23 @@ defmodule Makeup.Lexers.ElixirLexer do
522
701
attribute(),
523
702
# Keywords syntax sugar (must come before names)
524
703
keyword(),
704
+ # Do block (must come before names)
705
+ do_block(),
706
+ # fn ... end (must also come before names)
707
+ fn_end(),
525
708
# Name
526
709
name(),
527
710
# Module
528
711
module_name(),
529
712
# Anonymous function arguments (must come before the operators)
530
713
anon_function_arguments(),
714
+ # Maps, tuples and structs must be matched before punctuation and operators
715
+ struct_(),
716
+ map(),
717
+ tuple(),
718
+ parens(),
719
+ list(),
720
+ binary(),
531
721
# Operators
532
722
operator(),
533
723
# Punctuation
 
@@ -548,23 +738,26 @@ defmodule Makeup.Lexers.ElixirLexer do
548
738
# Strings and charlists (must come after the heredocs)
549
739
string(),
550
740
charlist(),
551
- # Maps and tuples can't be simple punctuation, because it would mess with interpolation
552
- map(),
553
- tuple(),
554
741
any_char()
555
742
])
556
743
)
557
744
558
745
@keywords MapSet.new(~W[fn do end after else rescue catch with])
746
+
559
747
@keyword_operators MapSet.new(~W[not and or when in])
748
+
560
749
@builtin MapSet.new(~W[
561
750
case cond for if unless try receive raise
562
751
quote unquote unquote_splicing throw super])
752
+
563
753
@builtin_declaration MapSet.new(~W[
564
754
def defp defmodule defprotocol defmacro defmacrop
565
755
defdelegate defexception defstruct defimpl defcallback])
756
+
566
757
@builtin_namespace MapSet.new(~W[import require use alias])
758
+
567
759
@constant MapSet.new(~W[nil true false])
760
+
568
761
@pseudovar MapSet.new(~W[_ __MODULE__ __DIR__ __ENV__ __CALLER__])
569
762
570
763
defp postprocess({:name, meta, value}) do
changed lib/makeup/lexers/html5_lexer.ex
 
@@ -1,4 +1,4 @@
1
- defmodule Makeup.Lexers.HTML5 do
1
+ defmodule Makeup.Lexers.HTML5Lexer do
2
2
@moduledoc """
3
3
Documentation for the HTML5 lexer.
added lib/makeup/pickers.ex
 
@@ -0,0 +1,13 @@
1
+ defmodule Makeup.Pickers do
2
+ alias Makeup.Lexers.{ElixirLexer, HTML5Lexer}
3
+ alias Makeup.Formatters.HTML.{HTMLFormatter}
4
+
5
+ def pick_lexer!(nil), do: ElixirLexer
6
+ def pick_lexer!("elixir"), do: ElixirLexer
7
+ def pick_lexer!("html5"), do: HTML5Lexer
8
+ def pick_lexer!("html"), do: HTML5Lexer
9
+
10
+ def pick_formatter!(nil), do: HTMLFormatter
11
+ def pick_formatter!("html"), do: HTMLFormatter
12
+
13
+ end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/abap.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.AbapStyle do
3
- @moduledoc """
4
- ABAP workbench like style.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -32,12 +19,14 @@ defmodule Makeup.Styles.HTML.AbapStyle do
32
19
33
20
alias Makeup.Styles.HTML.Style
34
21
35
- def style() do
36
- Style.make_style(
22
+ @style_struct Style.make_style(
37
23
short_name: "abap",
38
24
long_name: "Abap Style",
39
25
background_color: "#ffffff",
40
26
highlight_color: "#ffffcc",
41
27
styles: @styles)
28
+
29
+ def style() do
30
+ @style_struct()
42
31
end
43
32
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/algol.ex
 
@@ -1,40 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.AlgolStyle do
3
- @moduledoc """
4
- Algol publication style.
5
-
6
- This style renders source code for publication of algorithms in
7
- scientific papers and academic texts, where its format is frequently used.
8
-
9
- It is based on the style of the revised Algol-60 language report[1].
10
-
11
- o No colours, only black, white and shades of grey are used.
12
- o Keywords are rendered in lowercase underline boldface.
13
- o Builtins are rendered in lowercase boldface italic.
14
- o Docstrings and pragmas are rendered in dark grey boldface.
15
- o Library identifiers are rendered in dark grey boldface italic.
16
- o Comments are rendered in grey italic.
17
-
18
- To render keywords without underlining, refer to the `Algol_Nu` style.
19
-
20
- For lowercase conversion of keywords and builtins in languages where
21
- these are not or might not be lowercase, a supporting lexer is required.
22
- The Algol and Modula-2 lexers automatically convert to lowercase whenever
23
- this style is selected.
24
-
25
- [1] `Revised Report on the Algorithmic Language Algol-60 <https://www.masswerk.at/algol60/report.htm>`
26
-
27
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
28
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
29
-
30
- <table>
31
- <thead><tr><th>Warning</th></tr></thead>
32
- <tbody><tr><td>
33
- This file was automatically generated from the Pygments source.
34
- Any edits to this file may be lost if the file is regenerated.
35
- </td></tr></tbody>
36
- </table>
37
- """
3
+ @moduledoc false
38
4
39
5
require Makeup.Token.TokenTypes
40
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -60,12 +26,14 @@ defmodule Makeup.Styles.HTML.AlgolStyle do
60
26
61
27
alias Makeup.Styles.HTML.Style
62
28
63
- def style() do
64
- Style.make_style(
29
+ @style_struct Style.make_style(
65
30
short_name: "algol",
66
31
long_name: "Algol Style",
67
32
background_color: "#ffffff",
68
33
highlight_color: "#ffffcc",
69
34
styles: @styles)
35
+
36
+ def style() do
37
+ @style_struct()
70
38
end
71
39
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/algol_nu.ex
 
@@ -1,40 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.Algol_NuStyle do
3
- @moduledoc """
4
- Algol publication style without underlining of keywords.
5
-
6
- This style renders source code for publication of algorithms in
7
- scientific papers and academic texts, where its format is frequently used.
8
-
9
- It is based on the style of the revised Algol-60 language report[1].
10
-
11
- o No colours, only black, white and shades of grey are used.
12
- o Keywords are rendered in lowercase boldface.
13
- o Builtins are rendered in lowercase boldface italic.
14
- o Docstrings and pragmas are rendered in dark grey boldface.
15
- o Library identifiers are rendered in dark grey boldface italic.
16
- o Comments are rendered in grey italic.
17
-
18
- To render keywords with underlining, refer to the `Algol` style.
19
-
20
- For lowercase conversion of keywords and builtins in languages where
21
- these are not or might not be lowercase, a supporting lexer is required.
22
- The Algol and Modula-2 lexers automatically convert to lowercase whenever
23
- this style is selected.
24
-
25
- [1] `Revised Report on the Algorithmic Language Algol-60 <https://www.masswerk.at/algol60/report.htm>`
26
-
27
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
28
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
29
-
30
- <table>
31
- <thead><tr><th>Warning</th></tr></thead>
32
- <tbody><tr><td>
33
- This file was automatically generated from the Pygments source.
34
- Any edits to this file may be lost if the file is regenerated.
35
- </td></tr></tbody>
36
- </table>
37
- """
3
+ @moduledoc false
38
4
39
5
require Makeup.Token.TokenTypes
40
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -60,12 +26,14 @@ defmodule Makeup.Styles.HTML.Algol_NuStyle do
60
26
61
27
alias Makeup.Styles.HTML.Style
62
28
63
- def style() do
64
- Style.make_style(
29
+ @style_struct Style.make_style(
65
30
short_name: "algol_nu",
66
31
long_name: "Algol_Nu Style",
67
32
background_color: "#ffffff",
68
33
highlight_color: "#ffffcc",
69
34
styles: @styles)
35
+
36
+ def style() do
37
+ @style_struct()
70
38
end
71
39
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/arduino.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.ArduinoStyle do
3
- @moduledoc """
4
- Arduino® Syntax highlighting style.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -39,12 +26,14 @@ defmodule Makeup.Styles.HTML.ArduinoStyle do
39
26
40
27
alias Makeup.Styles.HTML.Style
41
28
42
- def style() do
43
- Style.make_style(
29
+ @style_struct Style.make_style(
44
30
short_name: "arduino",
45
31
long_name: "Arduino Style",
46
32
background_color: "#ffffff",
47
33
highlight_color: "#ffffcc",
48
34
styles: @styles)
35
+
36
+ def style() do
37
+ @style_struct()
49
38
end
50
39
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/autumn.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.AutumnStyle do
3
- @moduledoc """
4
- A colorful style, inspired by the terminal highlighting style.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -55,12 +42,14 @@ defmodule Makeup.Styles.HTML.AutumnStyle do
55
42
56
43
alias Makeup.Styles.HTML.Style
57
44
58
- def style() do
59
- Style.make_style(
45
+ @style_struct Style.make_style(
60
46
short_name: "autumn",
61
47
long_name: "Autumn Style",
62
48
background_color: "#ffffff",
63
49
highlight_color: "#ffffcc",
64
50
styles: @styles)
51
+
52
+ def style() do
53
+ @style_struct()
65
54
end
66
55
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/borland.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.BorlandStyle do
3
- @moduledoc """
4
- Style similar to the style used in the Borland IDEs.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -45,12 +32,14 @@ defmodule Makeup.Styles.HTML.BorlandStyle do
45
32
46
33
alias Makeup.Styles.HTML.Style
47
34
48
- def style() do
49
- Style.make_style(
35
+ @style_struct Style.make_style(
50
36
short_name: "borland",
51
37
long_name: "Borland Style",
52
38
background_color: "#ffffff",
53
39
highlight_color: "#ffffcc",
54
40
styles: @styles)
41
+
42
+ def style() do
43
+ @style_struct()
55
44
end
56
45
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/bw.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.BlackWhiteStyle do
3
- @moduledoc """
4
- Simple black/white only style.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -44,12 +31,14 @@ defmodule Makeup.Styles.HTML.BlackWhiteStyle do
44
31
45
32
alias Makeup.Styles.HTML.Style
46
33
47
- def style() do
48
- Style.make_style(
34
+ @style_struct Style.make_style(
49
35
short_name: "bw",
50
36
long_name: "BlackWhite Style",
51
37
background_color: "#ffffff",
52
38
highlight_color: "#ffffcc",
53
39
styles: @styles)
40
+
41
+ def style() do
42
+ @style_struct()
54
43
end
55
44
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/colorful.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.ColorfulStyle do
3
- @moduledoc """
4
- A colorful style, inspired by CodeRay.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -71,12 +58,14 @@ defmodule Makeup.Styles.HTML.ColorfulStyle do
71
58
72
59
alias Makeup.Styles.HTML.Style
73
60
74
- def style() do
75
- Style.make_style(
61
+ @style_struct Style.make_style(
76
62
short_name: "colorful",
77
63
long_name: "Colorful Style",
78
64
background_color: "#ffffff",
79
65
highlight_color: "#ffffcc",
80
66
styles: @styles)
67
+
68
+ def style() do
69
+ @style_struct()
81
70
end
82
71
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/default.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.DefaultStyle do
3
- @moduledoc """
4
- The default highlighting style.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -62,12 +49,14 @@ defmodule Makeup.Styles.HTML.DefaultStyle do
62
49
63
50
alias Makeup.Styles.HTML.Style
64
51
65
- def style() do
66
- Style.make_style(
52
+ @style_struct Style.make_style(
67
53
short_name: "default",
68
54
long_name: "Default Style",
69
55
background_color: "#f8f8f8",
70
56
highlight_color: "#ffffcc",
71
57
styles: @styles)
58
+
59
+ def style() do
60
+ @style_struct()
72
61
end
73
62
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/emacs.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.EmacsStyle do
3
- @moduledoc """
4
- A highlighting style for Pygments, inspired by Emacs.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -63,12 +50,14 @@ defmodule Makeup.Styles.HTML.EmacsStyle do
63
50
64
51
alias Makeup.Styles.HTML.Style
65
52
66
- def style() do
67
- Style.make_style(
53
+ @style_struct Style.make_style(
68
54
short_name: "emacs",
69
55
long_name: "Emacs Style",
70
56
background_color: "#f8f8f8",
71
57
highlight_color: "#ffffcc",
72
58
styles: @styles)
59
+
60
+ def style() do
61
+ @style_struct()
73
62
end
74
63
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/friendly.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.FriendlyStyle do
3
- @moduledoc """
4
- A modern style based on the VIM pyte theme.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -63,12 +50,14 @@ defmodule Makeup.Styles.HTML.FriendlyStyle do
63
50
64
51
alias Makeup.Styles.HTML.Style
65
52
66
- def style() do
67
- Style.make_style(
53
+ @style_struct Style.make_style(
68
54
short_name: "friendly",
69
55
long_name: "Friendly Style",
70
56
background_color: "#f0f0f0",
71
57
highlight_color: "#ffffcc",
72
58
styles: @styles)
59
+
60
+ def style() do
61
+ @style_struct()
73
62
end
74
63
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/fruity.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.FruityStyle do
3
- @moduledoc """
4
- pygments version of my "fruity" vim theme.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -39,12 +26,14 @@ defmodule Makeup.Styles.HTML.FruityStyle do
39
26
40
27
alias Makeup.Styles.HTML.Style
41
28
42
- def style() do
43
- Style.make_style(
29
+ @style_struct Style.make_style(
44
30
short_name: "fruity",
45
31
long_name: "Fruity Style",
46
32
background_color: "#111111",
47
33
highlight_color: "#333333",
48
34
styles: @styles)
35
+
36
+ def style() do
37
+ @style_struct()
49
38
end
50
39
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/igor.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.IgorStyle do
3
- @moduledoc """
4
- Igor Pro default style.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -30,12 +17,14 @@ defmodule Makeup.Styles.HTML.IgorStyle do
30
17
31
18
alias Makeup.Styles.HTML.Style
32
19
33
- def style() do
34
- Style.make_style(
20
+ @style_struct Style.make_style(
35
21
short_name: "igor",
36
22
long_name: "Igor Style",
37
23
background_color: "#ffffff",
38
24
highlight_color: "#ffffcc",
39
25
styles: @styles)
26
+
27
+ def style() do
28
+ @style_struct()
40
29
end
41
30
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/lovelace.ex
 
@@ -1,23 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.LovelaceStyle do
3
- @moduledoc """
4
- Lovelace by Miikka Salminen
5
-
6
- Pygments style by Miikka Salminen (https://github.com/miikkas)
7
- A desaturated, somewhat subdued style created for the Lovelace interactive
8
- learning environment.
9
-
10
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
11
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
12
-
13
- <table>
14
- <thead><tr><th>Warning</th></tr></thead>
15
- <tbody><tr><td>
16
- This file was automatically generated from the Pygments source.
17
- Any edits to this file may be lost if the file is regenerated.
18
- </td></tr></tbody>
19
- </table>
20
- """
3
+ @moduledoc false
21
4
22
5
require Makeup.Token.TokenTypes
23
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -76,12 +59,14 @@ defmodule Makeup.Styles.HTML.LovelaceStyle do
76
59
77
60
alias Makeup.Styles.HTML.Style
78
61
79
- def style() do
80
- Style.make_style(
62
+ @style_struct Style.make_style(
81
63
short_name: "lovelace",
82
64
long_name: "Lovelace Style",
83
65
background_color: "#ffffff",
84
66
highlight_color: "#ffffcc",
85
67
styles: @styles)
68
+
69
+ def style() do
70
+ @style_struct()
86
71
end
87
72
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/manni.ex
 
@@ -1,22 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.ManniStyle do
3
- @moduledoc """
4
- A colorful style, inspired by the terminal highlighting style.
5
-
6
- This is a port of the style used in the `php port`_ of pygments
7
- by Manni. The style is called 'default' there.
8
-
9
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
10
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
11
-
12
- <table>
13
- <thead><tr><th>Warning</th></tr></thead>
14
- <tbody><tr><td>
15
- This file was automatically generated from the Pygments source.
16
- Any edits to this file may be lost if the file is regenerated.
17
- </td></tr></tbody>
18
- </table>
19
- """
3
+ @moduledoc false
20
4
21
5
require Makeup.Token.TokenTypes
22
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -66,12 +50,14 @@ defmodule Makeup.Styles.HTML.ManniStyle do
66
50
67
51
alias Makeup.Styles.HTML.Style
68
52
69
- def style() do
70
- Style.make_style(
53
+ @style_struct Style.make_style(
71
54
short_name: "manni",
72
55
long_name: "Manni Style",
73
56
background_color: "#f0f3f3",
74
57
highlight_color: "#ffffcc",
75
58
styles: @styles)
59
+
60
+ def style() do
61
+ @style_struct()
76
62
end
77
63
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/monokai.ex
 
@@ -1,21 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.MonokaiStyle do
3
- @moduledoc """
4
- Mimic the Monokai color scheme. Based on tango.py.
5
-
6
- https://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
7
-
8
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
9
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
10
-
11
- <table>
12
- <thead><tr><th>Warning</th></tr></thead>
13
- <tbody><tr><td>
14
- This file was automatically generated from the Pygments source.
15
- Any edits to this file may be lost if the file is regenerated.
16
- </td></tr></tbody>
17
- </table>
18
- """
3
+ @moduledoc false
19
4
20
5
require Makeup.Token.TokenTypes
21
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -51,12 +36,14 @@ defmodule Makeup.Styles.HTML.MonokaiStyle do
51
36
52
37
alias Makeup.Styles.HTML.Style
53
38
54
- def style() do
55
- Style.make_style(
39
+ @style_struct Style.make_style(
56
40
short_name: "monokai",
57
41
long_name: "Monokai Style",
58
42
background_color: "#272822",
59
43
highlight_color: "#49483e",
60
44
styles: @styles)
45
+
46
+ def style() do
47
+ @style_struct()
61
48
end
62
49
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/murphy.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.MurphyStyle do
3
- @moduledoc """
4
- Murphy's style from CodeRay.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -71,12 +58,14 @@ defmodule Makeup.Styles.HTML.MurphyStyle do
71
58
72
59
alias Makeup.Styles.HTML.Style
73
60
74
- def style() do
75
- Style.make_style(
61
+ @style_struct Style.make_style(
76
62
short_name: "murphy",
77
63
long_name: "Murphy Style",
78
64
background_color: "#ffffff",
79
65
highlight_color: "#ffffcc",
80
66
styles: @styles)
67
+
68
+ def style() do
69
+ @style_struct()
81
70
end
82
71
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/native.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.NativeStyle do
3
- @moduledoc """
4
- pygments version of my "native" vim theme.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -54,12 +41,14 @@ defmodule Makeup.Styles.HTML.NativeStyle do
54
41
55
42
alias Makeup.Styles.HTML.Style
56
43
57
- def style() do
58
- Style.make_style(
44
+ @style_struct Style.make_style(
59
45
short_name: "native",
60
46
long_name: "Native Style",
61
47
background_color: "#202020",
62
48
highlight_color: "#404040",
63
49
styles: @styles)
50
+
51
+ def style() do
52
+ @style_struct()
64
53
end
65
54
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/paraiso-dark.ex
 
@@ -1,23 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.ParaisoDarkStyle do
3
- @moduledoc """
4
- Paraíso (Dark) by Jan T. Sott
5
-
6
- Pygments template by Jan T. Sott (https://github.com/idleberg)
7
- Created with Base16 Builder by Chris Kempson
8
- (https://github.com/chriskempson/base16-builder).
9
-
10
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
11
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
12
-
13
- <table>
14
- <thead><tr><th>Warning</th></tr></thead>
15
- <tbody><tr><td>
16
- This file was automatically generated from the Pygments source.
17
- Any edits to this file may be lost if the file is regenerated.
18
- </td></tr></tbody>
19
- </table>
20
- """
3
+ @moduledoc false
21
4
22
5
require Makeup.Token.TokenTypes
23
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -61,12 +44,14 @@ defmodule Makeup.Styles.HTML.ParaisoDarkStyle do
61
44
62
45
alias Makeup.Styles.HTML.Style
63
46
64
- def style() do
65
- Style.make_style(
47
+ @style_struct Style.make_style(
66
48
short_name: "paraiso_dark",
67
49
long_name: "ParaisoDark Style",
68
50
background_color: "#2f1e2e",
69
51
highlight_color: "#4f424c",
70
52
styles: @styles)
53
+
54
+ def style() do
55
+ @style_struct()
71
56
end
72
57
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/paraiso-light.ex
 
@@ -1,23 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.ParaisoLightStyle do
3
- @moduledoc """
4
- Paraíso (Light) by Jan T. Sott
5
-
6
- Pygments template by Jan T. Sott (https://github.com/idleberg)
7
- Created with Base16 Builder by Chris Kempson
8
- (https://github.com/chriskempson/base16-builder).
9
-
10
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
11
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
12
-
13
- <table>
14
- <thead><tr><th>Warning</th></tr></thead>
15
- <tbody><tr><td>
16
- This file was automatically generated from the Pygments source.
17
- Any edits to this file may be lost if the file is regenerated.
18
- </td></tr></tbody>
19
- </table>
20
- """
3
+ @moduledoc false
21
4
22
5
require Makeup.Token.TokenTypes
23
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -61,12 +44,14 @@ defmodule Makeup.Styles.HTML.ParaisoLightStyle do
61
44
62
45
alias Makeup.Styles.HTML.Style
63
46
64
- def style() do
65
- Style.make_style(
47
+ @style_struct Style.make_style(
66
48
short_name: "paraiso_light",
67
49
long_name: "ParaisoLight Style",
68
50
background_color: "#e7e9db",
69
51
highlight_color: "#a39e9b",
70
52
styles: @styles)
53
+
54
+ def style() do
55
+ @style_struct()
71
56
end
72
57
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/pastie.ex
 
@@ -1,21 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.PastieStyle do
3
- @moduledoc """
4
- Style similar to the `pastie`_ default style.
5
-
6
- .. _pastie: https://pastie.caboo.se/
7
-
8
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
9
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
10
-
11
- <table>
12
- <thead><tr><th>Warning</th></tr></thead>
13
- <tbody><tr><td>
14
- This file was automatically generated from the Pygments source.
15
- Any edits to this file may be lost if the file is regenerated.
16
- </td></tr></tbody>
17
- </table>
18
- """
3
+ @moduledoc false
19
4
20
5
require Makeup.Token.TokenTypes
21
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -66,12 +51,14 @@ defmodule Makeup.Styles.HTML.PastieStyle do
66
51
67
52
alias Makeup.Styles.HTML.Style
68
53
69
- def style() do
70
- Style.make_style(
54
+ @style_struct Style.make_style(
71
55
short_name: "pastie",
72
56
long_name: "Pastie Style",
73
57
background_color: "#ffffff",
74
58
highlight_color: "#ffffcc",
75
59
styles: @styles)
60
+
61
+ def style() do
62
+ @style_struct()
76
63
end
77
64
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/perldoc.ex
 
@@ -1,21 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.PerldocStyle do
3
- @moduledoc """
4
- Style similar to the style used in the `perldoc`_ code blocks.
5
-
6
- .. _perldoc: https://perldoc.perl.org/
7
-
8
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
9
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
10
-
11
- <table>
12
- <thead><tr><th>Warning</th></tr></thead>
13
- <tbody><tr><td>
14
- This file was automatically generated from the Pygments source.
15
- Any edits to this file may be lost if the file is regenerated.
16
- </td></tr></tbody>
17
- </table>
18
- """
3
+ @moduledoc false
19
4
20
5
require Makeup.Token.TokenTypes
21
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -58,12 +43,14 @@ defmodule Makeup.Styles.HTML.PerldocStyle do
58
43
59
44
alias Makeup.Styles.HTML.Style
60
45
61
- def style() do
62
- Style.make_style(
46
+ @style_struct Style.make_style(
63
47
short_name: "perldoc",
64
48
long_name: "Perldoc Style",
65
49
background_color: "#eeeedd",
66
50
highlight_color: "#ffffcc",
67
51
styles: @styles)
52
+
53
+ def style() do
54
+ @style_struct()
68
55
end
69
56
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/rainbow_dash.ex
 
@@ -1,21 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.RainbowDashStyle do
3
- @moduledoc """
4
- A bright and colorful syntax highlighting `theme`.
5
-
6
- .. _theme: https://sanssecours.github.io/Rainbow-Dash.tmbundle
7
-
8
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
9
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
10
-
11
- <table>
12
- <thead><tr><th>Warning</th></tr></thead>
13
- <tbody><tr><td>
14
- This file was automatically generated from the Pygments source.
15
- Any edits to this file may be lost if the file is regenerated.
16
- </td></tr></tbody>
17
- </table>
18
- """
3
+ @moduledoc false
19
4
20
5
require Makeup.Token.TokenTypes
21
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -61,12 +46,14 @@ defmodule Makeup.Styles.HTML.RainbowDashStyle do
61
46
62
47
alias Makeup.Styles.HTML.Style
63
48
64
- def style() do
65
- Style.make_style(
49
+ @style_struct Style.make_style(
66
50
short_name: "rainbow_dash",
67
51
long_name: "RainbowDash Style",
68
52
background_color: "#ffffff",
69
53
highlight_color: "#ffffcc",
70
54
styles: @styles)
55
+
56
+ def style() do
57
+ @style_struct()
71
58
end
72
59
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/rrt.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.RrtStyle do
3
- @moduledoc """
4
- pygments "rrt" theme, based on Zap and Emacs defaults.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -32,12 +19,14 @@ defmodule Makeup.Styles.HTML.RrtStyle do
32
19
33
20
alias Makeup.Styles.HTML.Style
34
21
35
- def style() do
36
- Style.make_style(
22
+ @style_struct Style.make_style(
37
23
short_name: "rrt",
38
24
long_name: "Rrt Style",
39
25
background_color: "#000000",
40
26
highlight_color: "#0000ff",
41
27
styles: @styles)
28
+
29
+ def style() do
30
+ @style_struct()
42
31
end
43
32
end
\ No newline at end of file
added lib/makeup/styles/html/pygments/samba.ex
 
@@ -0,0 +1,90 @@
1
+
2
+ defmodule Makeup.Styles.HTML.SambaStyle do
3
+ @moduledoc false
4
+
5
+ require Makeup.Token.TokenTypes
6
+ alias Makeup.Token.TokenTypes, as: Tok
7
+
8
+ @styles %{
9
+ Tok.error => "#a40000 border:#ef2929",
10
+ Tok.other => "#000000",
11
+ Tok.keyword => "bold #204a87",
12
+ Tok.keyword_constant => "bold #204a87",
13
+ Tok.keyword_declaration => "bold #204a87",
14
+ Tok.keyword_namespace => "bold #204a87",
15
+ Tok.keyword_pseudo => "bold #204a87",
16
+ Tok.keyword_reserved => "bold #204a87",
17
+ Tok.keyword_type => "bold #204a87",
18
+ Tok.name => "#000000",
19
+ Tok.name_attribute => "#c4a000",
20
+ Tok.name_builtin => "#204a87",
21
+ Tok.name_builtin_pseudo => "#3465a4",
22
+ Tok.name_class => "#5c35cc",
23
+ Tok.name_constant => "#000000",
24
+ Tok.name_decorator => "bold #5c35cc",
25
+ Tok.name_entity => "#ce5c00",
26
+ Tok.name_exception => "bold #cc0000",
27
+ Tok.name_function => "#000000",
28
+ Tok.name_property => "#000000",
29
+ Tok.name_label => "#f57900",
30
+ Tok.name_namespace => "#000000",
31
+ Tok.name_other => "#000000",
32
+ Tok.name_tag => "bold #204a87",
33
+ Tok.name_variable => "#000000",
34
+ Tok.name_variable_class => "#000000",
35
+ Tok.name_variable_global => "#000000",
36
+ Tok.name_variable_instance => "#000000",
37
+ Tok.literal => "#000000",
38
+ Tok.string => "#4e9a06",
39
+ Tok.string_backtick => "#4e9a06",
40
+ Tok.string_char => "#4e9a06",
41
+ Tok.string_doc => "italic #8f5902",
42
+ Tok.string_double => "#4e9a06",
43
+ Tok.string_escape => "#4e9a06",
44
+ Tok.string_heredoc => "#4e9a06",
45
+ Tok.string_interpol => "#4e9a06",
46
+ Tok.string_other => "#4e9a06",
47
+ Tok.string_regex => "#4e9a06",
48
+ Tok.string_single => "#4e9a06",
49
+ Tok.string_symbol => "#4e9a06",
50
+ Tok.number => "bold #0000cf",
51
+ Tok.number_float => "bold #0000cf",
52
+ Tok.number_hex => "bold #0000cf",
53
+ Tok.number_integer => "bold #0000cf",
54
+ Tok.number_integer_long => "bold #0000cf",
55
+ Tok.number_oct => "bold #0000cf",
56
+ Tok.operator => "bold #ce5c00",
57
+ Tok.operator_word => "bold #204a87",
58
+ Tok.punctuation => "#000000",
59
+ Tok.comment => "#8e908c",
60
+ Tok.comment_multiline => "#8e908c",
61
+ Tok.comment_preproc => "#8e908c",
62
+ Tok.comment_single => "#8e908c",
63
+ Tok.comment_special => "#8e908c",
64
+ Tok.generic => "#000000",
65
+ Tok.generic_deleted => "#a40000",
66
+ Tok.generic_emph => "italic #000000",
67
+ Tok.generic_error => "#ef2929",
68
+ Tok.generic_heading => "bold #000080",
69
+ Tok.generic_inserted => "#00A000",
70
+ Tok.generic_output => "italic #000000",
71
+ Tok.generic_prompt => "#8f5902",
72
+ Tok.generic_strong => "bold #000000",
73
+ Tok.generic_subheading => "bold #800080",
74
+ Tok.generic_traceback => "bold #a40000"
75
+
76
+ }
77
+
78
+ alias Makeup.Styles.HTML.Style
79
+
80
+ @style_struct Style.make_style(
81
+ short_name: "samba",
82
+ long_name: "Samba Style",
83
+ background_color: "#f8f8f8",
84
+ highlight_color: "#ffffcc",
85
+ styles: @styles)
86
+
87
+ def style() do
88
+ @style_struct()
89
+ end
90
+ end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/tango.ex
 
@@ -1,47 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.TangoStyle do
3
- @moduledoc """
4
- The Crunchy default Style inspired from the color palette from
5
- the Tango Icon Theme Guidelines.
6
-
7
- https://tango.freedesktop.org/Tango_Icon_Theme_Guidelines
8
-
9
- Butter: #fce94f #edd400 #c4a000
10
- Orange: #fcaf3e #f57900 #ce5c00
11
- Chocolate: #e9b96e #c17d11 #8f5902
12
- Chameleon: #8ae234 #73d216 #4e9a06
13
- Sky Blue: #729fcf #3465a4 #204a87
14
- Plum: #ad7fa8 #75507b #5c35cc
15
- Scarlet Red:#ef2929 #cc0000 #a40000
16
- Aluminium: #eeeeec #d3d7cf #babdb6
17
- #888a85 #555753 #2e3436
18
-
19
- Not all of the above colors are used; other colors added:
20
- very light grey: #f8f8f8 (for background)
21
-
22
- This style can be used as a template as it includes all the known
23
- Token types, unlike most (if not all) of the styles included in the
24
- Pygments distribution.
25
-
26
- However, since Crunchy is intended to be used by beginners, we have strived
27
- to create a style that gloss over subtle distinctions between different
28
- categories.
29
-
30
- Taking Python for example, comments (Comment.\*) and docstrings (String.Doc)
31
- have been chosen to have the same style. Similarly, keywords (Keyword.\*),
32
- and Operator.Word (and, or, in) have been assigned the same style.
33
-
34
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
35
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
36
-
37
- <table>
38
- <thead><tr><th>Warning</th></tr></thead>
39
- <tbody><tr><td>
40
- This file was automatically generated from the Pygments source.
41
- Any edits to this file may be lost if the file is regenerated.
42
- </td></tr></tbody>
43
- </table>
44
- """
3
+ @moduledoc false
45
4
46
5
require Makeup.Token.TokenTypes
47
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -118,12 +77,14 @@ defmodule Makeup.Styles.HTML.TangoStyle do
118
77
119
78
alias Makeup.Styles.HTML.Style
120
79
121
- def style() do
122
- Style.make_style(
80
+ @style_struct Style.make_style(
123
81
short_name: "tango",
124
82
long_name: "Tango Style",
125
83
background_color: "#f8f8f8",
126
84
highlight_color: "#ffffcc",
127
85
styles: @styles)
86
+
87
+ def style() do
88
+ @style_struct()
128
89
end
129
90
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/trac.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.TracStyle do
3
- @moduledoc """
4
- Port of the default trac highlighter design.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -54,12 +41,14 @@ defmodule Makeup.Styles.HTML.TracStyle do
54
41
55
42
alias Makeup.Styles.HTML.Style
56
43
57
- def style() do
58
- Style.make_style(
44
+ @style_struct Style.make_style(
59
45
short_name: "trac",
60
46
long_name: "Trac Style",
61
47
background_color: "#ffffff",
62
48
highlight_color: "#ffffcc",
63
49
styles: @styles)
50
+
51
+ def style() do
52
+ @style_struct()
64
53
end
65
54
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/vim.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.VimStyle do
3
- @moduledoc """
4
- A highlighting style for Pygments, inspired by vim.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -49,12 +36,14 @@ defmodule Makeup.Styles.HTML.VimStyle do
49
36
50
37
alias Makeup.Styles.HTML.Style
51
38
52
- def style() do
53
- Style.make_style(
39
+ @style_struct Style.make_style(
54
40
short_name: "vim",
55
41
long_name: "Vim Style",
56
42
background_color: "#000000",
57
43
highlight_color: "#222222",
58
44
styles: @styles)
45
+
46
+ def style() do
47
+ @style_struct()
59
48
end
60
49
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/vs.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.VisualStudioStyle do
3
- @moduledoc """
4
- Simple style with MS Visual Studio colors.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -37,12 +24,14 @@ defmodule Makeup.Styles.HTML.VisualStudioStyle do
37
24
38
25
alias Makeup.Styles.HTML.Style
39
26
40
- def style() do
41
- Style.make_style(
27
+ @style_struct Style.make_style(
42
28
short_name: "vs",
43
29
long_name: "VisualStudio Style",
44
30
background_color: "#ffffff",
45
31
highlight_color: "#ffffcc",
46
32
styles: @styles)
33
+
34
+ def style() do
35
+ @style_struct()
47
36
end
48
37
end
\ No newline at end of file
changed lib/makeup/styles/html/pygments/xcode.ex
 
@@ -1,19 +1,6 @@
1
1
2
2
defmodule Makeup.Styles.HTML.XcodeStyle do
3
- @moduledoc """
4
- Style similar to the `Xcode` default theme.
5
-
6
- &copy; Copyright 2006-2017 by the Pygments team, see AUTHORS.
7
- License: BSD, see [here](https://opensource.org/licenses/BSD-3-Clause) for details.
8
-
9
- <table>
10
- <thead><tr><th>Warning</th></tr></thead>
11
- <tbody><tr><td>
12
- This file was automatically generated from the Pygments source.
13
- Any edits to this file may be lost if the file is regenerated.
14
- </td></tr></tbody>
15
- </table>
16
- """
3
+ @moduledoc false
17
4
18
5
require Makeup.Token.TokenTypes
19
6
alias Makeup.Token.TokenTypes, as: Tok
 
@@ -43,12 +30,14 @@ defmodule Makeup.Styles.HTML.XcodeStyle do
43
30
44
31
alias Makeup.Styles.HTML.Style
45
32
46
- def style() do
47
- Style.make_style(
33
+ @style_struct Style.make_style(
48
34
short_name: "xcode",
49
35
long_name: "Xcode Style",
50
36
background_color: "#ffffff",
51
37
highlight_color: "#ffffcc",
52
38
styles: @styles)
39
+
40
+ def style() do
41
+ @style_struct()
53
42
end
54
43
end
\ No newline at end of file
changed lib/makeup/styles/html/style_map.ex
 
@@ -1,36 +1,313 @@
1
1
defmodule Makeup.Styles.HTML.StyleMap do
2
- use Const
2
+ @moduledoc """
3
+ This module contains all styles, and facilities to map style names (binaries or atoms) to styles.
3
4
4
- # %% Start Pygments - Don't remove this line %%
5
- const abap, do: Makeup.Styles.HTML.AbapStyle.style()
6
- const algol, do: Makeup.Styles.HTML.AlgolStyle.style()
7
- const algol_nu, do: Makeup.Styles.HTML.Algol_NuStyle.style()
8
- const arduino, do: Makeup.Styles.HTML.ArduinoStyle.style()
9
- const autumn, do: Makeup.Styles.HTML.AutumnStyle.style()
10
- const borland, do: Makeup.Styles.HTML.BorlandStyle.style()
11
- const bw, do: Makeup.Styles.HTML.BlackWhiteStyle.style()
12
- const colorful, do: Makeup.Styles.HTML.ColorfulStyle.style()
13
- const default, do: Makeup.Styles.HTML.DefaultStyle.style()
14
- const emacs, do: Makeup.Styles.HTML.EmacsStyle.style()
15
- const friendly, do: Makeup.Styles.HTML.FriendlyStyle.style()
16
- const fruity, do: Makeup.Styles.HTML.FruityStyle.style()
17
- const igor, do: Makeup.Styles.HTML.IgorStyle.style()
18
- const lovelace, do: Makeup.Styles.HTML.LovelaceStyle.style()
19
- const manni, do: Makeup.Styles.HTML.ManniStyle.style()
20
- const monokai, do: Makeup.Styles.HTML.MonokaiStyle.style()
21
- const murphy, do: Makeup.Styles.HTML.MurphyStyle.style()
22
- const native, do: Makeup.Styles.HTML.NativeStyle.style()
23
- const paraiso_dark, do: Makeup.Styles.HTML.ParaisoDarkStyle.style()
24
- const paraiso_light, do: Makeup.Styles.HTML.ParaisoLightStyle.style()
25
- const pastie, do: Makeup.Styles.HTML.PastieStyle.style()
26
- const perldoc, do: Makeup.Styles.HTML.PerldocStyle.style()
27
- const rainbow_dash, do: Makeup.Styles.HTML.RainbowDashStyle.style()
28
- const rrt, do: Makeup.Styles.HTML.RrtStyle.style()
29
- const tango, do: Makeup.Styles.HTML.TangoStyle.style()
30
- const trac, do: Makeup.Styles.HTML.TracStyle.style()
31
- const vim, do: Makeup.Styles.HTML.VimStyle.style()
32
- const vs, do: Makeup.Styles.HTML.VisualStudioStyle.style()
33
- const xcode, do: Makeup.Styles.HTML.XcodeStyle.style()
34
- # %% End Pygments - Don't remove this line %%
5
+ Style names are of the form `<name>_style`.
6
+
7
+ The supported style names are: `:abap`, `:algol`, `:algol_nu`.
8
+
9
+ You the style name `:abap`, for example, refers to the `abap_style`.
10
+ """
11
+
12
+ alias Makeup.Styles.HTML
13
+
14
+ # %% Start Pygments %%
15
+
16
+ @doc """
17
+ The *abap* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#abap).
18
+ """
19
+ def abap_style, do: HTML.AbapStyle.style()
20
+
21
+
22
+ @doc """
23
+ The *algol* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#algol).
24
+ """
25
+ def algol_style, do: HTML.AlgolStyle.style()
26
+
27
+
28
+ @doc """
29
+ The *algol_nu* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#algol_nu).
30
+ """
31
+ def algol_nu_style, do: HTML.Algol_NuStyle.style()
32
+
33
+
34
+ @doc """
35
+ The *arduino* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#arduino).
36
+ """
37
+ def arduino_style, do: HTML.ArduinoStyle.style()
38
+
39
+
40
+ @doc """
41
+ The *autumn* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#autumn).
42
+ """
43
+ def autumn_style, do: HTML.AutumnStyle.style()
44
+
45
+
46
+ @doc """
47
+ The *borland* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#borland).
48
+ """
49
+ def borland_style, do: HTML.BorlandStyle.style()
50
+
51
+
52
+ @doc """
53
+ The *bw* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#bw).
54
+ """
55
+ def bw_style, do: HTML.BlackWhiteStyle.style()
56
+
57
+
58
+ @doc """
59
+ The *colorful* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#colorful).
60
+ """
61
+ def colorful_style, do: HTML.ColorfulStyle.style()
62
+
63
+
64
+ @doc """
65
+ The *default* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#default).
66
+ """
67
+ def default_style, do: HTML.DefaultStyle.style()
68
+
69
+
70
+ @doc """
71
+ The *emacs* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#emacs).
72
+ """
73
+ def emacs_style, do: HTML.EmacsStyle.style()
74
+
75
+
76
+ @doc """
77
+ The *friendly* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#friendly).
78
+ """
79
+ def friendly_style, do: HTML.FriendlyStyle.style()
80
+
81
+
82
+ @doc """
83
+ The *fruity* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#fruity).
84
+ """
85
+ def fruity_style, do: HTML.FruityStyle.style()
86
+
87
+
88
+ @doc """
89
+ The *igor* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#igor).
90
+ """
91
+ def igor_style, do: HTML.IgorStyle.style()
92
+
93
+
94
+ @doc """
95
+ The *lovelace* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#lovelace).
96
+ """
97
+ def lovelace_style, do: HTML.LovelaceStyle.style()
98
+
99
+
100
+ @doc """
101
+ The *manni* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#manni).
102
+ """
103
+ def manni_style, do: HTML.ManniStyle.style()
104
+
105
+
106
+ @doc """
107
+ The *monokai* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#monokai).
108
+ """
109
+ def monokai_style, do: HTML.MonokaiStyle.style()
110
+
111
+
112
+ @doc """
113
+ The *murphy* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#murphy).
114
+ """
115
+ def murphy_style, do: HTML.MurphyStyle.style()
116
+
117
+
118
+ @doc """
119
+ The *native* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#native).
120
+ """
121
+ def native_style, do: HTML.NativeStyle.style()
122
+
123
+
124
+ @doc """
125
+ The *paraiso_dark* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#paraiso_dark).
126
+ """
127
+ def paraiso_dark_style, do: HTML.ParaisoDarkStyle.style()
128
+
129
+
130
+ @doc """
131
+ The *paraiso_light* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#paraiso_light).
132
+ """
133
+ def paraiso_light_style, do: HTML.ParaisoLightStyle.style()
134
+
135
+
136
+ @doc """
137
+ The *pastie* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#pastie).
138
+ """
139
+ def pastie_style, do: HTML.PastieStyle.style()
140
+
141
+
142
+ @doc """
143
+ The *perldoc* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#perldoc).
144
+ """
145
+ def perldoc_style, do: HTML.PerldocStyle.style()
146
+
147
+
148
+ @doc """
149
+ The *rainbow_dash* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#rainbow_dash).
150
+ """
151
+ def rainbow_dash_style, do: HTML.RainbowDashStyle.style()
152
+
153
+
154
+ @doc """
155
+ The *rrt* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#rrt).
156
+ """
157
+ def rrt_style, do: HTML.RrtStyle.style()
158
+
159
+
160
+ @doc """
161
+ The *tango* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#tango).
162
+ """
163
+ def tango_style, do: HTML.TangoStyle.style()
164
+
165
+
166
+ @doc """
167
+ The *trac* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#trac).
168
+ """
169
+ def trac_style, do: HTML.TracStyle.style()
170
+
171
+
172
+ @doc """
173
+ The *vim* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#vim).
174
+ """
175
+ def vim_style, do: HTML.VimStyle.style()
176
+
177
+
178
+ @doc """
179
+ The *vs* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#vs).
180
+ """
181
+ def vs_style, do: HTML.VisualStudioStyle.style()
182
+
183
+
184
+ @doc """
185
+ The *xcode* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#xcode).
186
+ """
187
+ def xcode_style, do: HTML.XcodeStyle.style()
188
+
189
+ # All styles
190
+ @pygments_style_map_binaries %{
191
+ "abap" => HTML.AbapStyle.style(),
192
+ "algol" => HTML.AlgolStyle.style(),
193
+ "algol_nu" => HTML.Algol_NuStyle.style(),
194
+ "arduino" => HTML.ArduinoStyle.style(),
195
+ "autumn" => HTML.AutumnStyle.style(),
196
+ "borland" => HTML.BorlandStyle.style(),
197
+ "bw" => HTML.BlackWhiteStyle.style(),
198
+ "colorful" => HTML.ColorfulStyle.style(),
199
+ "default" => HTML.DefaultStyle.style(),
200
+ "emacs" => HTML.EmacsStyle.style(),
201
+ "friendly" => HTML.FriendlyStyle.style(),
202
+ "fruity" => HTML.FruityStyle.style(),
203
+ "igor" => HTML.IgorStyle.style(),
204
+ "lovelace" => HTML.LovelaceStyle.style(),
205
+ "manni" => HTML.ManniStyle.style(),
206
+ "monokai" => HTML.MonokaiStyle.style(),
207
+ "murphy" => HTML.MurphyStyle.style(),
208
+ "native" => HTML.NativeStyle.style(),
209
+ "paraiso_dark" => HTML.ParaisoDarkStyle.style(),
210
+ "paraiso_light" => HTML.ParaisoLightStyle.style(),
211
+ "pastie" => HTML.PastieStyle.style(),
212
+ "perldoc" => HTML.PerldocStyle.style(),
213
+ "rainbow_dash" => HTML.RainbowDashStyle.style(),
214
+ "rrt" => HTML.RrtStyle.style(),
215
+ "tango" => HTML.TangoStyle.style(),
216
+ "trac" => HTML.TracStyle.style(),
217
+ "vim" => HTML.VimStyle.style(),
218
+ "vs" => HTML.VisualStudioStyle.style(),
219
+ "xcode" => HTML.XcodeStyle.style(),
220
+ }
221
+
222
+ @pygments_style_map_atoms %{
223
+ abap: HTML.AbapStyle.style(),
224
+ algol: HTML.AlgolStyle.style(),
225
+ algol_nu: HTML.Algol_NuStyle.style(),
226
+ arduino: HTML.ArduinoStyle.style(),
227
+ autumn: HTML.AutumnStyle.style(),
228
+ borland: HTML.BorlandStyle.style(),
229
+ bw: HTML.BlackWhiteStyle.style(),
230
+ colorful: HTML.ColorfulStyle.style(),
231
+ default: HTML.DefaultStyle.style(),
232
+ emacs: HTML.EmacsStyle.style(),
233
+ friendly: HTML.FriendlyStyle.style(),
234
+ fruity: HTML.FruityStyle.style(),
235
+ igor: HTML.IgorStyle.style(),
236
+ lovelace: HTML.LovelaceStyle.style(),
237
+ manni: HTML.ManniStyle.style(),
238
+ monokai: HTML.MonokaiStyle.style(),
239
+ murphy: HTML.MurphyStyle.style(),
240
+ native: HTML.NativeStyle.style(),
241
+ paraiso_dark: HTML.ParaisoDarkStyle.style(),
242
+ paraiso_light: HTML.ParaisoLightStyle.style(),
243
+ pastie: HTML.PastieStyle.style(),
244
+ perldoc: HTML.PerldocStyle.style(),
245
+ rainbow_dash: HTML.RainbowDashStyle.style(),
246
+ rrt: HTML.RrtStyle.style(),
247
+ tango: HTML.TangoStyle.style(),
248
+ trac: HTML.TracStyle.style(),
249
+ vim: HTML.VimStyle.style(),
250
+ vs: HTML.VisualStudioStyle.style(),
251
+ xcode: HTML.XcodeStyle.style(),
252
+ }
253
+
254
+ # %% End Pygments %%
255
+
256
+ # Custom themes:
257
+ @doc """
258
+ The *samba* style, based on the tango style, but with visual distinction between
259
+ classes and variables, and lighter punctuation.
260
+ """
261
+ def samba_style, do: HTML.SambaStyle.style()
262
+
263
+ @doc """
264
+ The style with the `name`, given as an atom. Returns `{:ok, style}` or `:error`
265
+ """
266
+ def fetch_from_atom(atom), do: Map.fetch(@pygments_style_map_atoms, atom)
267
+
268
+ @doc """
269
+ The style with the `name`, given as a binary. Returns `{:ok, style}` or `:error`
270
+ """
271
+ def fetch_from_string(name), do: Map.fetch(@pygments_style_map_binaries, name)
272
+
273
+ @doc """
274
+ The style with the `name`, given as an atom. Raises if the style doesn't exist.
275
+ """
276
+ def fetch_from_atom!(atom), do: Map.fetch!(@pygments_style_map_atoms, atom)
277
+
278
+ @doc """
279
+ The style with the `name`, given as a binary. Raises if the style doesn't exist.
280
+ """
281
+ def fetch_from_string!(name), do: Map.fetch!(@pygments_style_map_binaries, name)
282
+
283
+ @doc """
284
+ Returns all atoms that are style names.
285
+ """
286
+ def all_style_keys_as_atoms do
287
+ Map.keys(@pygments_style_map_atoms)
288
+ end
289
+
290
+ @doc """
291
+ Returns all binaries that are style names.
292
+ """
293
+ def all_style_keys_as_binaries do
294
+ Map.keys(@pygments_style_map_binaries)
295
+ end
296
+
297
+ @doc """
298
+ The complete style map, with atoms as keys.
299
+ For the complete list, see above.
300
+ """
301
+ def style_map_with_atom_keys do
302
+ @pygments_style_map_atoms
303
+ end
304
+
305
+ @doc """
306
+ The complete style map, with strings as keys.
307
+ For the complete list, see above.
308
+ """
309
+ def style_map_with_binary_keys do
310
+ @pygments_style_map_binaries
311
+ end
35
312
36
313
end
\ No newline at end of file
changed mix.exs
 
@@ -4,7 +4,7 @@ defmodule Sandbox.Mixfile do
4
4
def project do
5
5
[
6
6
app: :makeup,
7
- version: "0.1.1",
7
+ version: "0.1.3",
8
8
elixir: "~> 1.0",
9
9
start_permanent: Mix.env == :prod,
10
10
deps: deps(),
 
@@ -50,6 +50,7 @@ defmodule Sandbox.Mixfile do
50
50
{:exconstructor, "~> 1.1.0"},
51
51
{:html_entities, "~> 0.3.0"},
52
52
{:ex_doc, "~> 0.14", only: :dev, runtime: false}
53
+ #{:ex_doc, path: "../ex_doc", only: :dev, runtime: false}
53
54
]
54
55
end
55
56
end