changed CHANGELOG.md
 
@@ -1,5 +1,14 @@
1
1
# Changelog
2
2
3
+ ### 1.1.1 - 2023-11-08
4
+
5
+ Add dracula theme.
6
+
7
+ Add one dark theme.
8
+
9
+ Fix warnings on recent Elixir versions.
10
+
11
+
3
12
### 1.1.0 - 2022-02-12
4
13
5
14
Require NimbleParsec `~> 1.2.2` onwards to prepare for future deprecations.
changed README.md
 
@@ -19,25 +19,29 @@ It has **lexers**, **formatters** and **styles**.
19
19
20
20
## Demo
21
21
22
- To see a sample of Makeup's output, go check the [demo](https://tmbb.github.io/makeup_demo/).
22
+ To see a sample of Makeup's output, go check the [demo](https://elixir-makeup.github.io/makeup_demo/).
23
23
Please note that not all styles define all differences between tokens.
24
24
In a given style, strings and characters might be rendered in the same color while in others , the colors might be different.
25
25
26
26
That is style-dependent.
27
27
28
28
Some of the richer styles are
29
- the Tango style ([elixir](https://tmbb.github.io/makeup_demo/elixir.html#tango)),
30
- the Colorful style ([elixir](https://tmbb.github.io/makeup_demo/elixir.html#colorful)),
31
- the Default style ([elixir](https://tmbb.github.io/makeup_demo/elixir.html#default)), and
32
- the Friendly style ([elixir](https://tmbb.github.io/makeup_demo/elixir.html#friendly)).
29
+ the Tango style ([elixir](https://elixir-makeup.github.io/makeup_demo/elixir.html#tango)),
30
+ the Colorful style ([elixir](https://elixir-makeup.github.io/makeup_demo/elixir.html#colorful)),
31
+ the Default style ([elixir](https://elixir-makeup.github.io/makeup_demo/elixir.html#default)), and
32
+ the Friendly style ([elixir](https://elixir-makeup.github.io/makeup_demo/elixir.html#friendly)).
33
33
34
34
## Supported Languages
35
35
36
36
The supported source languages are:
37
37
38
- * [Elixir](https://github.com/tmbb/makeup_elixir)
39
- * [Erlang](https://github.com/tmbb/makeup_erlang)
40
- * [C](https://github.com/boydm/makeup_c)
38
+ * [Elixir](https://github.com/elixir-makeup/makeup_elixir)
39
+ * [Erlang](https://github.com/elixir-makeup/makeup_erlang)
40
+ * [C](https://github.com/elixir-makeup/makeup_c)
41
+ * [HTML](https://github.com/elixir-makeup/makeup_html)
42
+ * [Diff](https://github.com/elixir-makeup/makeup_diff)
43
+ * [JSON](https://github.com/elixir-makeup/makeup_json)
44
+ * [(H)EEx](https://github.com/elixir-makeup/makeup_eex)
41
45
42
46
## Installation
changed hex_metadata.config
 
@@ -1,8 +1,20 @@
1
- {<<"app">>,<<"makeup">>}.
2
- {<<"build_tools">>,[<<"mix">>]}.
1
+ {<<"links">>,
2
+ [{<<"Changelog">>,<<"https://hexdocs.pm/makeup/changelog.html">>},
3
+ {<<"Contributing">>,<<"https://hexdocs.pm/makeup/contributing.html">>},
4
+ {<<"GitHub">>,<<"https://github.com/elixir-makeup/makeup">>}]}.
5
+ {<<"name">>,<<"makeup">>}.
6
+ {<<"version">>,<<"1.1.1">>}.
3
7
{<<"description">>,
4
8
<<"Syntax highlighter for source code in the style of Pygments.">>}.
5
9
{<<"elixir">>,<<"~> 1.6">>}.
10
+ {<<"app">>,<<"makeup">>}.
11
+ {<<"licenses">>,[<<"BSD-2-Clause">>]}.
12
+ {<<"requirements">>,
13
+ [[{<<"name">>,<<"nimble_parsec">>},
14
+ {<<"app">>,<<"nimble_parsec">>},
15
+ {<<"optional">>,false},
16
+ {<<"requirement">>,<<"~> 1.2.2 or ~> 1.3">>},
17
+ {<<"repository">>,<<"hexpm">>}]]}.
6
18
{<<"files">>,
7
19
[<<"lib">>,<<"lib/makeup">>,<<"lib/makeup/token">>,
8
20
<<"lib/makeup/token/utils">>,<<"lib/makeup/token/utils/hierarchy.ex">>,
 
@@ -14,51 +26,10 @@
14
26
<<"lib/makeup/formatters/html/html_formatter.ex">>,
15
27
<<"lib/makeup/formatters/html/scripts">>,
16
28
<<"lib/makeup/formatters/html/scripts/group_highlighter_javascript.js">>,
17
- <<"lib/makeup/styles">>,<<"lib/makeup/styles/html.ex">>,
18
- <<"lib/makeup/styles/html">>,<<"lib/makeup/styles/html/pygments">>,
19
- <<"lib/makeup/styles/html/pygments/tango.ex">>,
20
- <<"lib/makeup/styles/html/pygments/monokai.ex">>,
21
- <<"lib/makeup/styles/html/pygments/friendly.ex">>,
22
- <<"lib/makeup/styles/html/pygments/algol_nu.ex">>,
23
- <<"lib/makeup/styles/html/pygments/native.ex">>,
24
- <<"lib/makeup/styles/html/pygments/colorful.ex">>,
25
- <<"lib/makeup/styles/html/pygments/samba.ex">>,
26
- <<"lib/makeup/styles/html/pygments/pastie.ex">>,
27
- <<"lib/makeup/styles/html/pygments/xcode.ex">>,
28
- <<"lib/makeup/styles/html/pygments/paraiso-dark.ex">>,
29
- <<"lib/makeup/styles/html/pygments/paraiso-light.ex">>,
30
- <<"lib/makeup/styles/html/pygments/abap.ex">>,
31
- <<"lib/makeup/styles/html/pygments/rainbow_dash.ex">>,
32
- <<"lib/makeup/styles/html/pygments/manni.ex">>,
33
- <<"lib/makeup/styles/html/pygments/murphy.ex">>,
34
- <<"lib/makeup/styles/html/pygments/fruity.ex">>,
35
- <<"lib/makeup/styles/html/pygments/perldoc.ex">>,
36
- <<"lib/makeup/styles/html/pygments/trac.ex">>,
37
- <<"lib/makeup/styles/html/pygments/algol.ex">>,
38
- <<"lib/makeup/styles/html/pygments/autumn.ex">>,
39
- <<"lib/makeup/styles/html/pygments/rrt.ex">>,
40
- <<"lib/makeup/styles/html/pygments/arduino.ex">>,
41
- <<"lib/makeup/styles/html/pygments/bw.ex">>,
42
- <<"lib/makeup/styles/html/pygments/emacs.ex">>,
43
- <<"lib/makeup/styles/html/pygments/vs.ex">>,
44
- <<"lib/makeup/styles/html/pygments/default.ex">>,
45
- <<"lib/makeup/styles/html/pygments/igor.ex">>,
46
- <<"lib/makeup/styles/html/pygments/lovelace.ex">>,
47
- <<"lib/makeup/styles/html/pygments/borland.ex">>,
48
- <<"lib/makeup/styles/html/pygments/vim.ex">>,
49
- <<"lib/makeup/styles/html/style_map.ex">>,<<"lib/makeup/application.ex">>,
29
+ <<"lib/makeup/styles">>,<<"lib/makeup/styles/html">>,
30
+ <<"lib/makeup/styles/html/token_style.ex">>,
31
+ <<"lib/makeup/styles/html/style_map.ex">>,
32
+ <<"lib/makeup/styles/html/style.ex">>,<<"lib/makeup/application.ex">>,
50
33
<<"lib/makeup/lexer.ex">>,<<"lib/makeup.ex">>,<<"mix.exs">>,<<"README.md">>,
51
34
<<"LICENSE">>,<<"CHANGELOG.md">>]}.
52
- {<<"licenses">>,[<<"BSD">>]}.
53
- {<<"links">>,
54
- [{<<"Changelog">>,<<"https://hexdocs.pm/makeup/changelog.html">>},
55
- {<<"Contributing">>,<<"https://hexdocs.pm/makeup/contributing.html">>},
56
- {<<"GitHub">>,<<"https://github.com/elixir-makeup/makeup">>}]}.
57
- {<<"name">>,<<"makeup">>}.
58
- {<<"requirements">>,
59
- [[{<<"app">>,<<"nimble_parsec">>},
60
- {<<"name">>,<<"nimble_parsec">>},
61
- {<<"optional">>,false},
62
- {<<"repository">>,<<"hexpm">>},
63
- {<<"requirement">>,<<"~> 1.2.2 or ~> 1.3">>}]]}.
64
- {<<"version">>,<<"1.1.0">>}.
35
+ {<<"build_tools">>,[<<"mix">>]}.
changed lib/makeup.ex
 
@@ -7,15 +7,22 @@ defmodule Makeup do
7
7
"""
8
8
alias Makeup.Formatters.HTML.HTMLFormatter
9
9
alias Makeup.Lexers.ElixirLexer
10
- alias Makeup.Styles.HTML.StyleMap
11
- alias Makeup.Styles.HTML.Style
12
10
alias Makeup.Registry
13
- require StyleMap
14
11
15
12
@doc """
16
13
Highlights the given string using the given lexer and formatter.
17
14
18
- By default it highlight the Elixir language using HTML
15
+ By default it highlight the Elixir language using
16
+ `Makeup.Formatters.HTML.HTMLFormatter`.
17
+
18
+ ## Options:
19
+
20
+ - `:lexer` - module name of the lexer to use (default: `Makeup.Lexers.ElixirLexer`)
21
+ - `:lexer_options` - list of options for the lexer
22
+ - `:formatter` - module name of the formatter to use (defult: `Makeup.Formatters.HTML.HTMLFormatter`)
23
+ - `:formatter_options` - list of options for the formatter. For the included HTMLFormatter, that's:
24
+ - `:css_class` - css class(es) of the main `<pre>` element (default: `"highlight"`)
25
+ - `:highlight_tag` - tag that wraps every token (default: `"span"`)
19
26
"""
20
27
def highlight(source, options \\ []) do
21
28
{lexer, lexer_options} = fetch_lexer(options)
 
@@ -26,16 +33,20 @@ defmodule Makeup do
26
33
module when is_atom(module) -> module
27
34
end
28
35
29
- tokens = apply(lexer, :lex, [source, lexer_options])
30
- apply(formatter, :format_as_binary, [tokens])
36
+ formatter_options = Keyword.get(options, :formatter_options, [])
37
+ tokens = lexer.lex(source, lexer_options)
38
+ formatter.format_as_binary(tokens, formatter_options)
31
39
end
32
40
41
+ @doc """
42
+ Convenience for formatting as the inner bits of HTML.
43
+ """
33
44
def highlight_inner_html(source, options \\ []) do
34
45
{lexer, lexer_options} = fetch_lexer(options)
35
46
formatter_options = Keyword.get(options, :formatter_options, [])
36
47
37
- tokens = apply(lexer, :lex, [source, lexer_options])
38
- apply(HTMLFormatter, :format_inner_as_binary, [tokens, formatter_options])
48
+ tokens = lexer.lex(source, lexer_options)
49
+ HTMLFormatter.format_inner_as_binary(tokens, formatter_options)
39
50
end
40
51
41
52
defp fetch_lexer(options) do
 
@@ -52,11 +63,11 @@ defmodule Makeup do
52
63
@doc """
53
64
Generates a CSS stylesheet for highlighted code for the given style.
54
65
55
- It expects a `style`, either as an atom name or as `StyleMap`, and the
56
- `css_class` as the top level class for highlighted code.
66
+ It expects a `style`, either as an atom name or as "style map",
67
+ and the `css_class` as the top level class for highlighted code.
57
68
58
- Ff the `css_class` is `"highlight"` (the default), the stylesheet has
59
- the form:
69
+ For example, if the `css_class` is `"highlight"` (the default), the stylesheet
70
+ has the form:
60
71
61
72
```css
62
73
.highlight .someclass {...}
 
@@ -65,13 +76,7 @@ defmodule Makeup do
65
76
66
77
See `Makeup.Styles.HTML.StyleMap` for all style maps.
67
78
"""
68
- def stylesheet(style \\ StyleMap.default_style(), css_class \\ "highlight")
69
-
70
- def stylesheet(style, css_class) when is_atom(style) do
71
- stylesheet(apply(StyleMap, style, []), css_class)
72
- end
73
-
74
- def stylesheet(style, css_class) do
75
- Style.stylesheet(style, css_class)
79
+ def stylesheet(style \\ :default_style, css_class \\ "highlight") do
80
+ HTMLFormatter.stylesheet(style, css_class)
76
81
end
77
82
end
changed lib/makeup/application.ex
 
@@ -1,4 +1,5 @@
1
1
defmodule Makeup.Application do
2
+ @moduledoc false
2
3
use Application
3
4
4
5
alias Makeup.Registry
changed lib/makeup/formatters/html/html_formatter.ex
 
@@ -125,7 +125,13 @@ defmodule Makeup.Formatters.HTML.HTMLFormatter do
125
125
@doc """
126
126
Return the CSS stylesheet for a given style.
127
127
"""
128
- def stylesheet(style, css_class \\ "highlight") do
128
+ def stylesheet(style \\ :default_style, css_class \\ "highlight")
129
+
130
+ def stylesheet(style, css_class) when is_atom(style) do
131
+ stylesheet(apply(Makeup.Styles.HTML.StyleMap, style, []), css_class)
132
+ end
133
+
134
+ def stylesheet(style, css_class) do
129
135
Makeup.Styles.HTML.Style.stylesheet(style, css_class)
130
136
end
changed lib/makeup/lexer.ex
 
@@ -67,9 +67,9 @@ defmodule Makeup.Lexer do
67
67
68
68
all_but_last_line =
69
69
parts
70
- |> Enum.slice(0..-2)
70
+ |> Enum.drop(-1)
71
71
|> Enum.map(fn tok_text -> [{ttype, meta, tok_text}] end)
72
- |> :lists.reverse
72
+ |> :lists.reverse()
73
73
74
74
last_line = [{ttype, meta, Enum.at(parts, -1)}]
changed lib/makeup/lexer/postprocess.ex
 
@@ -92,22 +92,22 @@ defmodule Makeup.Lexer.Postprocess do
92
92
Actually, you'll want to define some kind of helper to make it less verbose.
93
93
For example:
94
94
95
- ```elixir
96
- defmodule MyTest do
97
- use ExUnit.Case
98
- alias Makeup.Lexers.ElixirLexer
99
- alias Makeup.Lexer.Postprocess
95
+ defmodule MyTest do
96
+ use ExUnit.Case
97
+ alias Makeup.Lexers.ElixirLexer
98
+ alias Makeup.Lexer.Postprocess
100
99
101
- def lex(text) do
102
- text
103
- |> ElixirLexer.lex(group_prefix: "group")
104
- |> Postprocess.token_values_to_binaries()
105
- end
100
+ def lex(text) do
101
+ text
102
+ |> ElixirLexer.lex(group_prefix: "group")
103
+ |> Postprocess.token_values_to_binaries()
104
+ end
105
+
106
+ test "even better with our little helper" do
107
+ assert lex(":atom") == [{:string_symbol, %{language: :elixir}, ":atom"}]
108
+ end
109
+ end
106
110
107
- test "even better with our little helper" do
108
- assert lex(":atom") == [{:string_symbol, %{language: :elixir}, ":atom"}]
109
- end
110
- end
111
111
"""
112
112
def token_values_to_binaries(tokens) do
113
113
Enum.map(tokens, &token_value_to_binary/1)
changed lib/makeup/lexer/types.ex
 
@@ -2,7 +2,7 @@ defmodule Makeup.Lexer.Types do
2
2
@type token :: {atom(), map(), iodata()}
3
3
@type tokens :: [token()]
4
4
@type context :: map()
5
- @type parsec_success :: {:ok, tokens, String.t(), context(), integer(), integer()}
5
+ @type parsec_success :: {:ok, tokens, String.t(), context(), {integer(), integer()}, integer()}
6
6
@type parsec_failure :: {:error, String.t(), String.t(), context(), {integer(), integer()}, integer()}
7
7
@type parsec_result :: parsec_success | parsec_failure
8
8
@type parsec :: (String.t -> parsec_result)
removed lib/makeup/styles/html.ex
 
@@ -1,216 +0,0 @@
1
- defmodule Makeup.Styles.HTML do
2
- defmodule Style do
3
- defstruct long_name: "",
4
- short_name: "",
5
- background_color: "#ffffff",
6
- highlight_color: "#ffffcc",
7
- styles: []
8
-
9
- alias Makeup.Styles.HTML.TokenStyle
10
- require Makeup.Token.Utils
11
- alias Makeup.Token.Utils
12
-
13
- defp handle_inheritance(style_map) do
14
- # Handles insheritance between styles.
15
- # This is automatic in Pygments' design, because they use class inheritance for tokens.
16
- # We don't have class inheritance in elixir, so we must have something else.
17
- # Here, we use a manually build hierarchy to fake inheritance.
18
- #
19
- # In any case, the goal is to have flat tokens at runtime.
20
- # This function is only called at compile time.
21
- Enum.reduce(Utils.precedence(), style_map, fn {parent_key, child_keys}, style_map ->
22
- parent_style = style_map[parent_key]
23
-
24
- Enum.reduce(child_keys, style_map, fn child_key, style_map ->
25
- child_style = style_map[child_key]
26
-
27
- Map.put(
28
- style_map,
29
- child_key,
30
- Map.merge(
31
- parent_style,
32
- child_style,
33
- fn _k, v1, v2 -> v2 || v1 end
34
- )
35
- )
36
- end)
37
- end)
38
- end
39
-
40
- require EEx
41
-
42
- EEx.function_from_string(
43
- :def,
44
- :render_css,
45
- """
46
- .<%= highlight_class %> .hll {background-color: <%= highlight_color %>}
47
- .<%= highlight_class %> {\
48
- <%= if token_text.color do %>color: <%= token_text.color %>; <% end %>\
49
- <%= if token_text.font_style do %>font-style: <%= token_text.font_style %>; <% end %>\
50
- <%= if token_text.font_weight do %>font-weight: <%= token_text.font_weight %>; <% end %>\
51
- <%= if token_text.border do %>border: <%= token_text.border %>; <% end %>\
52
- <%= if token_text.text_decoration do %>text-decoration: <%= token_text.text_decoration %>; <% end %>\
53
- <%= if background_color do %>background-color: <%= background_color %><% end %>}\
54
- .<%= highlight_class %> .unselectable {
55
- -webkit-touch-callout: none;
56
- -webkit-user-select: none;
57
- -khtml-user-select: none;
58
- -moz-user-select: none;
59
- -ms-user-select: none;
60
- user-select: none;
61
- }
62
- <%= for {css_class, token_style, token_type} <- styles do %>
63
- .<%= highlight_class %> .<%= css_class %> {\
64
- <%= if token_style.color do %>color: <%= token_style.color %>; <% end %>\
65
- <%= if token_style.font_style do %>font-style: <%= token_style.font_style %>; <% end %>\
66
- <%= if token_style.font_weight do %>font-weight: <%= token_style.font_weight %>; <% end %>\
67
- <%= if token_style.border do %>border: <%= token_style.border %>; <% end %>\
68
- <%= if token_style.text_decoration do %>text-decoration: <%= token_style.text_decoration %>; <% end %>\
69
- <%= if token_style.background_color do %>background-color: <%= token_style.background_color %>; <% end %>\
70
- } /* :<%= Atom.to_string(token_type) %> */\
71
- <% end %>
72
- """,
73
- [:highlight_class, :highlight_color, :background_color, :token_text, :styles]
74
- )
75
-
76
- @doc """
77
- Generate a stylesheet for a style.
78
- """
79
- def stylesheet(style, css_class \\ "highlight") do
80
- token_styles =
81
- style.styles
82
- |> Map.delete(:text)
83
- |> Enum.into([])
84
- |> Enum.map(fn {token_type, token_style} ->
85
- css_class = Makeup.Token.Utils.css_class_for_token_type(token_type)
86
- {css_class, token_style, token_type}
87
- end)
88
- |> Enum.filter(fn {_, token_style, _} ->
89
- Makeup.Styles.HTML.TokenStyle.not_empty?(token_style)
90
- end)
91
- |> Enum.sort()
92
-
93
- token_text = style.styles[:text]
94
-
95
- render_css(
96
- css_class,
97
- style.highlight_color,
98
- style.background_color,
99
- token_text,
100
- token_styles
101
- )
102
- end
103
-
104
- @doc """
105
- Creates a new style.
106
-
107
- Takes care of unspecified token types and inheritance.
108
- Writes and caches a CSS stylesheet for the style.
109
- """
110
- def make_style(options \\ []) do
111
- short_name = Keyword.fetch!(options, :short_name)
112
- long_name = Keyword.fetch!(options, :long_name)
113
- background_color = Keyword.fetch!(options, :background_color)
114
- highlight_color = Keyword.fetch!(options, :highlight_color)
115
- incomplete_style_map = Keyword.fetch!(options, :styles)
116
-
117
- complete_style_map =
118
- Utils.standard_token_types()
119
- |> Enum.map(fn k -> {k, ""} end)
120
- |> Enum.into(%{})
121
- |> Map.merge(incomplete_style_map)
122
- |> Enum.map(fn {k, v} -> {k, TokenStyle.from_string(v)} end)
123
- |> Enum.into(%{})
124
- |> handle_inheritance
125
-
126
- %__MODULE__{
127
- long_name: long_name,
128
- short_name: short_name,
129
- background_color: background_color,
130
- highlight_color: highlight_color,
131
- styles: complete_style_map
132
- }
133
- end
134
- end
135
-
136
- defmodule TokenStyle do
137
- @moduledoc """
138
- A CSS style for a single token.
139
- """
140
-
141
- defstruct font_style: nil,
142
- font_weight: nil,
143
- border: nil,
144
- text_decoration: nil,
145
- color: nil,
146
- background_color: nil,
147
- literal: nil
148
-
149
- @doc """
150
- A `TokenStyle` is considered empty if all its fields are `nil`.
151
-
152
- A CSS class for an empty `TokenStyle` is not rendered in the stylesheet.
153
- This saves a little space and makes the stylesheet more human-readable.
154
- """
155
- def empty?(style) do
156
- not not_empty?(style)
157
- end
158
-
159
- @doc """
160
- A `TokenStyle` is empty if at least a field is not `nil`.
161
-
162
- A CSS class for an empty `TokenStyle` is rendered in the stylesheet.
163
- """
164
- def not_empty?(style) do
165
- style |> Map.from_struct() |> Map.values() |> Enum.any?()
166
- end
167
-
168
- # Foreground color
169
- defp to_attr("#" <> _ = color), do: {:color, color}
170
- # Background color
171
- defp to_attr("bg:" <> color), do: {:background_color, color}
172
- # Border (can only specify border color)
173
- defp to_attr("border:" <> color), do: {:border, color}
174
- # Font weight (bold vs normal)
175
- defp to_attr("bold"), do: {:font_weight, "bold"}
176
- defp to_attr("nobold"), do: {:font_weight, "normal"}
177
- # Font style (italic vs oblique vs normal)
178
- defp to_attr("italic"), do: {:font_style, "italic"}
179
- defp to_attr("oblique"), do: {:font_style, "oblique"}
180
- defp to_attr("noitalic"), do: {:font_style, "normal"}
181
- # Text decoration (underline vs none)
182
- defp to_attr("underline"), do: {:text_decoration, "underline"}
183
- # Unrecognized commands:
184
- defp to_attr(other) do
185
- # Log the command
186
- IO.warn("unknown attribute #{inspect(other)}")
187
- false
188
- end
189
-
190
- @doc """
191
- Creates a `TokenStyle` from string description.
192
-
193
- The string description is highly optimized for the goal of being typed by a human.
194
- The following commands are recognized:
195
-
196
- * `~r/#[0-9a-f]+/` for foreround color
197
- * `~r/bg:#[0-9a-f]+/` for background color
198
- * `~r/border:#[0-9a-f]+/` for border color
199
- * `italic` for `font-style: italic`
200
- * `oblique` for `font-style: oblique`
201
- * `noitalic` for `font-style: normal`
202
- * `underline` for `font-style: underline`
203
-
204
- No other commands are currently recognized.
205
- """
206
- def from_string(str) do
207
- attrs =
208
- str
209
- |> String.split()
210
- |> Enum.map(&to_attr/1)
211
- |> Enum.filter(fn x -> x end)
212
-
213
- struct(TokenStyle, attrs)
214
- end
215
- end
216
- end
removed lib/makeup/styles/html/pygments/abap.ex
 
@@ -1,29 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.AbapStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "#F00",
7
- :keyword => "#00f",
8
- :name => "#000",
9
- :string => "#5a2",
10
- :number => "#3af",
11
- :operator_word => "#00f",
12
- :comment => "italic #888",
13
- :comment_special => "#888",
14
-
15
- }
16
-
17
- alias Makeup.Styles.HTML.Style
18
-
19
- @style_struct Style.make_style(
20
- short_name: "abap",
21
- long_name: "Abap Style",
22
- background_color: "#ffffff",
23
- highlight_color: "#ffffcc",
24
- styles: @styles)
25
-
26
- def style() do
27
- @style_struct
28
- end
29
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/algol.ex
 
@@ -1,36 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.AlgolStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "border:#FF0000",
7
- :keyword => "underline bold",
8
- :keyword_declaration => "italic",
9
- :name_builtin => "bold italic",
10
- :name_builtin_pseudo => "bold italic",
11
- :name_class => "bold italic #666",
12
- :name_constant => "bold italic #666",
13
- :name_function => "bold italic #666",
14
- :name_namespace => "bold italic #666",
15
- :name_variable => "bold italic #666",
16
- :string => "italic #666",
17
- :operator_word => "bold",
18
- :comment => "italic #888",
19
- :comment_preproc => "bold noitalic #888",
20
- :comment_special => "bold noitalic #888",
21
-
22
- }
23
-
24
- alias Makeup.Styles.HTML.Style
25
-
26
- @style_struct Style.make_style(
27
- short_name: "algol",
28
- long_name: "Algol Style",
29
- background_color: "#ffffff",
30
- highlight_color: "#ffffcc",
31
- styles: @styles)
32
-
33
- def style() do
34
- @style_struct
35
- end
36
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/algol_nu.ex
 
@@ -1,36 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.Algol_NuStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "border:#FF0000",
7
- :keyword => "bold",
8
- :keyword_declaration => "italic",
9
- :name_builtin => "bold italic",
10
- :name_builtin_pseudo => "bold italic",
11
- :name_class => "bold italic #666",
12
- :name_constant => "bold italic #666",
13
- :name_function => "bold italic #666",
14
- :name_namespace => "bold italic #666",
15
- :name_variable => "bold italic #666",
16
- :string => "italic #666",
17
- :operator_word => "bold",
18
- :comment => "italic #888",
19
- :comment_preproc => "bold noitalic #888",
20
- :comment_special => "bold noitalic #888",
21
-
22
- }
23
-
24
- alias Makeup.Styles.HTML.Style
25
-
26
- @style_struct Style.make_style(
27
- short_name: "algol_nu",
28
- long_name: "Algol_Nu Style",
29
- background_color: "#ffffff",
30
- highlight_color: "#ffffcc",
31
- styles: @styles)
32
-
33
- def style() do
34
- @style_struct
35
- end
36
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/arduino.ex
 
@@ -1,36 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.ArduinoStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "#a61717",
7
- :keyword => "#728E00",
8
- :keyword_constant => "#00979D",
9
- :keyword_pseudo => "#00979D",
10
- :keyword_reserved => "#00979D",
11
- :keyword_type => "#00979D",
12
- :name => "#434f54",
13
- :name_builtin => "#728E00",
14
- :name_function => "#D35400",
15
- :name_other => "#728E00",
16
- :string => "#7F8C8D",
17
- :number => "#8A7B52",
18
- :operator => "#728E00",
19
- :comment => "#95a5a6",
20
- :comment_preproc => "#728E00",
21
-
22
- }
23
-
24
- alias Makeup.Styles.HTML.Style
25
-
26
- @style_struct Style.make_style(
27
- short_name: "arduino",
28
- long_name: "Arduino Style",
29
- background_color: "#ffffff",
30
- highlight_color: "#ffffcc",
31
- styles: @styles)
32
-
33
- def style() do
34
- @style_struct
35
- end
36
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/autumn.ex
 
@@ -1,52 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.AutumnStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "#F00 bg:#FAA",
7
- :keyword => "#0000aa",
8
- :keyword_type => "#00aaaa",
9
- :name_attribute => "#1e90ff",
10
- :name_builtin => "#00aaaa",
11
- :name_class => "underline #00aa00",
12
- :name_constant => "#aa0000",
13
- :name_decorator => "#888888",
14
- :name_entity => "bold #800",
15
- :name_function => "#00aa00",
16
- :name_namespace => "underline #00aaaa",
17
- :name_tag => "bold #1e90ff",
18
- :name_variable => "#aa0000",
19
- :string => "#aa5500",
20
- :string_regex => "#009999",
21
- :string_symbol => "#0000aa",
22
- :number => "#009999",
23
- :operator_word => "#0000aa",
24
- :comment => "italic #aaaaaa",
25
- :comment_preproc => "noitalic #4c8317",
26
- :comment_special => "italic #0000aa",
27
- :generic_deleted => "#aa0000",
28
- :generic_emph => "italic",
29
- :generic_error => "#aa0000",
30
- :generic_heading => "bold #000080",
31
- :generic_inserted => "#00aa00",
32
- :generic_output => "#888888",
33
- :generic_prompt => "#555555",
34
- :generic_strong => "bold",
35
- :generic_subheading => "bold #800080",
36
- :generic_traceback => "#aa0000"
37
-
38
- }
39
-
40
- alias Makeup.Styles.HTML.Style
41
-
42
- @style_struct Style.make_style(
43
- short_name: "autumn",
44
- long_name: "Autumn Style",
45
- background_color: "#ffffff",
46
- highlight_color: "#ffffcc",
47
- styles: @styles)
48
-
49
- def style() do
50
- @style_struct
51
- end
52
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/borland.ex
 
@@ -1,42 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.BorlandStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "bg:#e3d2d2 #a61717",
7
- :keyword => "bold #000080",
8
- :name_attribute => "#FF0000",
9
- :name_tag => "bold #000080",
10
- :string => "#0000FF",
11
- :string_char => "#800080",
12
- :number => "#0000FF",
13
- :operator_word => "bold",
14
- :comment => "italic #008800",
15
- :comment_preproc => "noitalic #008080",
16
- :comment_special => "noitalic bold",
17
- :generic_deleted => "bg:#ffdddd #000000",
18
- :generic_emph => "italic",
19
- :generic_error => "#aa0000",
20
- :generic_heading => "#999999",
21
- :generic_inserted => "bg:#ddffdd #000000",
22
- :generic_output => "#888888",
23
- :generic_prompt => "#555555",
24
- :generic_strong => "bold",
25
- :generic_subheading => "#aaaaaa",
26
- :generic_traceback => "#aa0000"
27
-
28
- }
29
-
30
- alias Makeup.Styles.HTML.Style
31
-
32
- @style_struct Style.make_style(
33
- short_name: "borland",
34
- long_name: "Borland Style",
35
- background_color: "#ffffff",
36
- highlight_color: "#ffffcc",
37
- styles: @styles)
38
-
39
- def style() do
40
- @style_struct
41
- end
42
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/bw.ex
 
@@ -1,41 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.BlackWhiteStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "border:#FF0000",
7
- :keyword => "bold",
8
- :keyword_pseudo => "nobold",
9
- :keyword_type => "nobold",
10
- :name_class => "bold",
11
- :name_entity => "bold",
12
- :name_exception => "bold",
13
- :name_namespace => "bold",
14
- :name_tag => "bold",
15
- :string => "italic",
16
- :string_escape => "bold",
17
- :string_interpol => "bold",
18
- :operator_word => "bold",
19
- :comment => "italic",
20
- :comment_preproc => "noitalic",
21
- :generic_emph => "italic",
22
- :generic_heading => "bold",
23
- :generic_prompt => "bold",
24
- :generic_strong => "bold",
25
- :generic_subheading => "bold",
26
-
27
- }
28
-
29
- alias Makeup.Styles.HTML.Style
30
-
31
- @style_struct Style.make_style(
32
- short_name: "bw",
33
- long_name: "BlackWhite Style",
34
- background_color: "#ffffff",
35
- highlight_color: "#ffffcc",
36
- styles: @styles)
37
-
38
- def style() do
39
- @style_struct
40
- end
41
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/colorful.ex
 
@@ -1,68 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.ColorfulStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "#F00 bg:#FAA",
7
- :keyword => "bold #080",
8
- :keyword_pseudo => "#038",
9
- :keyword_type => "#339",
10
- :name_attribute => "#00C",
11
- :name_builtin => "#007020",
12
- :name_class => "bold #B06",
13
- :name_constant => "bold #036",
14
- :name_decorator => "bold #555",
15
- :name_entity => "bold #800",
16
- :name_exception => "bold #F00",
17
- :name_function => "bold #06B",
18
- :name_label => "bold #970",
19
- :name_namespace => "bold #0e84b5",
20
- :name_tag => "#070",
21
- :name_variable => "#963",
22
- :name_variable_class => "#369",
23
- :name_variable_global => "bold #d70",
24
- :name_variable_instance => "#33B",
25
- :string => "bg:#fff0f0",
26
- :string_char => "#04D bg:",
27
- :string_doc => "#D42 bg:",
28
- :string_escape => "bold #666",
29
- :string_interpol => "bg:#eee",
30
- :string_other => "#D20",
31
- :string_regex => "bg:#fff0ff #000",
32
- :string_symbol => "#A60 bg:",
33
- :number => "bold #60E",
34
- :number_float => "bold #60E",
35
- :number_hex => "bold #058",
36
- :number_integer => "bold #00D",
37
- :number_oct => "bold #40E",
38
- :operator => "#333",
39
- :operator_word => "bold #000",
40
- :comment => "#888",
41
- :comment_preproc => "#579",
42
- :comment_special => "bold #cc0000",
43
- :generic_deleted => "#A00000",
44
- :generic_emph => "italic",
45
- :generic_error => "#FF0000",
46
- :generic_heading => "bold #000080",
47
- :generic_inserted => "#00A000",
48
- :generic_output => "#888",
49
- :generic_prompt => "bold #c65d09",
50
- :generic_strong => "bold",
51
- :generic_subheading => "bold #800080",
52
- :generic_traceback => "#04D"
53
-
54
- }
55
-
56
- alias Makeup.Styles.HTML.Style
57
-
58
- @style_struct Style.make_style(
59
- short_name: "colorful",
60
- long_name: "Colorful Style",
61
- background_color: "#ffffff",
62
- highlight_color: "#ffffcc",
63
- styles: @styles)
64
-
65
- def style() do
66
- @style_struct
67
- end
68
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/default.ex
 
@@ -1,59 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.DefaultStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "border:#FF0000",
7
- :keyword => "bold #008000",
8
- :keyword_pseudo => "nobold",
9
- :keyword_type => "nobold #B00040",
10
- :name_attribute => "#7D9029",
11
- :name_builtin => "#008000",
12
- :name_class => "bold #0000FF",
13
- :name_constant => "#880000",
14
- :name_decorator => "#AA22FF",
15
- :name_entity => "bold #999999",
16
- :name_exception => "bold #D2413A",
17
- :name_function => "#0000FF",
18
- :name_label => "#A0A000",
19
- :name_namespace => "bold #0000FF",
20
- :name_tag => "bold #008000",
21
- :name_variable => "#19177C",
22
- :string => "#BA2121",
23
- :string_doc => "italic",
24
- :string_escape => "bold #BB6622",
25
- :string_interpol => "bold #BB6688",
26
- :string_other => "#008000",
27
- :string_regex => "#BB6688",
28
- :string_symbol => "#19177C",
29
- :number => "#666666",
30
- :operator => "#666666",
31
- :operator_word => "bold #AA22FF",
32
- :comment => "italic #408080",
33
- :comment_preproc => "noitalic #BC7A00",
34
- :generic_deleted => "#A00000",
35
- :generic_emph => "italic",
36
- :generic_error => "#FF0000",
37
- :generic_heading => "bold #000080",
38
- :generic_inserted => "#00A000",
39
- :generic_output => "#888",
40
- :generic_prompt => "bold #000080",
41
- :generic_strong => "bold",
42
- :generic_subheading => "bold #800080",
43
- :generic_traceback => "#04D"
44
-
45
- }
46
-
47
- alias Makeup.Styles.HTML.Style
48
-
49
- @style_struct Style.make_style(
50
- short_name: "default",
51
- long_name: "Default Style",
52
- background_color: "#f8f8f8",
53
- highlight_color: "#ffffcc",
54
- styles: @styles)
55
-
56
- def style() do
57
- @style_struct
58
- end
59
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/emacs.ex
 
@@ -1,60 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.EmacsStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "border:#FF0000",
7
- :keyword => "bold #AA22FF",
8
- :keyword_pseudo => "nobold",
9
- :keyword_type => "bold #00BB00",
10
- :name_attribute => "#BB4444",
11
- :name_builtin => "#AA22FF",
12
- :name_class => "#0000FF",
13
- :name_constant => "#880000",
14
- :name_decorator => "#AA22FF",
15
- :name_entity => "bold #999999",
16
- :name_exception => "bold #D2413A",
17
- :name_function => "#00A000",
18
- :name_label => "#A0A000",
19
- :name_namespace => "bold #0000FF",
20
- :name_tag => "bold #008000",
21
- :name_variable => "#B8860B",
22
- :string => "#BB4444",
23
- :string_doc => "italic",
24
- :string_escape => "bold #BB6622",
25
- :string_interpol => "bold #BB6688",
26
- :string_other => "#008000",
27
- :string_regex => "#BB6688",
28
- :string_symbol => "#B8860B",
29
- :number => "#666666",
30
- :operator => "#666666",
31
- :operator_word => "bold #AA22FF",
32
- :comment => "italic #008800",
33
- :comment_preproc => "noitalic",
34
- :comment_special => "noitalic bold",
35
- :generic_deleted => "#A00000",
36
- :generic_emph => "italic",
37
- :generic_error => "#FF0000",
38
- :generic_heading => "bold #000080",
39
- :generic_inserted => "#00A000",
40
- :generic_output => "#888",
41
- :generic_prompt => "bold #000080",
42
- :generic_strong => "bold",
43
- :generic_subheading => "bold #800080",
44
- :generic_traceback => "#04D"
45
-
46
- }
47
-
48
- alias Makeup.Styles.HTML.Style
49
-
50
- @style_struct Style.make_style(
51
- short_name: "emacs",
52
- long_name: "Emacs Style",
53
- background_color: "#f8f8f8",
54
- highlight_color: "#ffffcc",
55
- styles: @styles)
56
-
57
- def style() do
58
- @style_struct
59
- end
60
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/friendly.ex
 
@@ -1,60 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.FriendlyStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "border:#FF0000",
7
- :keyword => "bold #007020",
8
- :keyword_pseudo => "nobold",
9
- :keyword_type => "nobold #902000",
10
- :name_attribute => "#4070a0",
11
- :name_builtin => "#007020",
12
- :name_class => "bold #0e84b5",
13
- :name_constant => "#60add5",
14
- :name_decorator => "bold #555555",
15
- :name_entity => "bold #d55537",
16
- :name_exception => "#007020",
17
- :name_function => "#06287e",
18
- :name_label => "bold #002070",
19
- :name_namespace => "bold #0e84b5",
20
- :name_tag => "bold #062873",
21
- :name_variable => "#bb60d5",
22
- :string => "#4070a0",
23
- :string_doc => "italic",
24
- :string_escape => "bold #4070a0",
25
- :string_interpol => "italic #70a0d0",
26
- :string_other => "#c65d09",
27
- :string_regex => "#235388",
28
- :string_symbol => "#517918",
29
- :number => "#40a070",
30
- :operator => "#666666",
31
- :operator_word => "bold #007020",
32
- :comment => "italic #60a0b0",
33
- :comment_preproc => "noitalic #007020",
34
- :comment_special => "noitalic bg:#fff0f0",
35
- :generic_deleted => "#A00000",
36
- :generic_emph => "italic",
37
- :generic_error => "#FF0000",
38
- :generic_heading => "bold #000080",
39
- :generic_inserted => "#00A000",
40
- :generic_output => "#888",
41
- :generic_prompt => "bold #c65d09",
42
- :generic_strong => "bold",
43
- :generic_subheading => "bold #800080",
44
- :generic_traceback => "#04D"
45
-
46
- }
47
-
48
- alias Makeup.Styles.HTML.Style
49
-
50
- @style_struct Style.make_style(
51
- short_name: "friendly",
52
- long_name: "Friendly Style",
53
- background_color: "#f0f0f0",
54
- highlight_color: "#ffffcc",
55
- styles: @styles)
56
-
57
- def style() do
58
- @style_struct
59
- end
60
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/fruity.ex
 
@@ -1,36 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.FruityStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :keyword => "#fb660a bold",
7
- :keyword_pseudo => "nobold",
8
- :keyword_type => "#cdcaa9 bold",
9
- :name_attribute => "#ff0086 bold",
10
- :name_constant => "#0086d2",
11
- :name_function => "#ff0086 bold",
12
- :name_tag => "#fb660a bold",
13
- :name_variable => "#fb660a",
14
- :string => "#0086d2",
15
- :number => "#0086f7 bold",
16
- :comment => "#008800 bg:#0f140f italic",
17
- :comment_preproc => "#ff0007 bold",
18
- :generic_heading => "#ffffff bold",
19
- :generic_output => "#444444 bg:#222222",
20
- :generic_subheading => "#ffffff bold",
21
-
22
- }
23
-
24
- alias Makeup.Styles.HTML.Style
25
-
26
- @style_struct Style.make_style(
27
- short_name: "fruity",
28
- long_name: "Fruity Style",
29
- background_color: "#111111",
30
- highlight_color: "#333333",
31
- styles: @styles)
32
-
33
- def style() do
34
- @style_struct
35
- end
36
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/igor.ex
 
@@ -1,28 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.IgorStyle do
3
- @moduledoc false
4
-
5
-
6
- @styles %{
7
- :keyword => "#0000FF",
8
- :name_class => "#007575",
9
- :name_decorator => "#CC00A3",
10
- :name_function => "#C34E00",
11
- :string => "#009C00",
12
- :comment => "italic #FF0000",
13
-
14
- }
15
-
16
- alias Makeup.Styles.HTML.Style
17
-
18
- @style_struct Style.make_style(
19
- short_name: "igor",
20
- long_name: "Igor Style",
21
- background_color: "#ffffff",
22
- highlight_color: "#ffffcc",
23
- styles: @styles)
24
-
25
- def style() do
26
- @style_struct
27
- end
28
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/lovelace.ex
 
@@ -1,69 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.LovelaceStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "bg:#a848a8",
7
- :keyword => "#2838b0",
8
- :keyword_constant => "italic #444444",
9
- :keyword_declaration => "italic",
10
- :keyword_type => "italic",
11
- :name_attribute => "#388038",
12
- :name_builtin => "#388038",
13
- :name_builtin_pseudo => "italic",
14
- :name_class => "#287088",
15
- :name_constant => "#b85820",
16
- :name_decorator => "#287088",
17
- :name_entity => "#709030",
18
- :name_exception => "#908828",
19
- :name_function => "#785840",
20
- :name_function_magic => "#b85820",
21
- :name_label => "#289870",
22
- :name_namespace => "#289870",
23
- :name_tag => "#2838b0",
24
- :name_variable => "#b04040",
25
- :name_variable_global => "#908828",
26
- :name_variable_magic => "#b85820",
27
- :string => "#b83838",
28
- :string_affix => "#444444",
29
- :string_char => "#a848a8",
30
- :string_delimiter => "#b85820",
31
- :string_doc => "italic #b85820",
32
- :string_escape => "#709030",
33
- :string_interpol => "underline",
34
- :string_other => "#a848a8",
35
- :string_regex => "#a848a8",
36
- :number => "#444444",
37
- :operator => "#666666",
38
- :operator_word => "#a848a8",
39
- :punctuation => "#888888",
40
- :comment => "italic #888888",
41
- :comment_hashbang => "#287088",
42
- :comment_multiline => "#888888",
43
- :comment_preproc => "noitalic #289870",
44
- :generic_deleted => "#c02828",
45
- :generic_emph => "italic",
46
- :generic_error => "#c02828",
47
- :generic_heading => "#666666",
48
- :generic_inserted => "#388038",
49
- :generic_output => "#666666",
50
- :generic_prompt => "#444444",
51
- :generic_strong => "bold",
52
- :generic_subheading => "#444444",
53
- :generic_traceback => "#2838b0"
54
-
55
- }
56
-
57
- alias Makeup.Styles.HTML.Style
58
-
59
- @style_struct Style.make_style(
60
- short_name: "lovelace",
61
- long_name: "Lovelace Style",
62
- background_color: "#ffffff",
63
- highlight_color: "#ffffcc",
64
- styles: @styles)
65
-
66
- def style() do
67
- @style_struct
68
- end
69
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/manni.ex
 
@@ -1,60 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.ManniStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "bg:#FFAAAA #AA0000",
7
- :keyword => "bold #006699",
8
- :keyword_pseudo => "nobold",
9
- :keyword_type => "#007788",
10
- :name_attribute => "#330099",
11
- :name_builtin => "#336666",
12
- :name_class => "bold #00AA88",
13
- :name_constant => "#336600",
14
- :name_decorator => "#9999FF",
15
- :name_entity => "bold #999999",
16
- :name_exception => "bold #CC0000",
17
- :name_function => "#CC00FF",
18
- :name_label => "#9999FF",
19
- :name_namespace => "bold #00CCFF",
20
- :name_tag => "bold #330099",
21
- :name_variable => "#003333",
22
- :string => "#CC3300",
23
- :string_doc => "italic",
24
- :string_escape => "bold #CC3300",
25
- :string_interpol => "#AA0000",
26
- :string_other => "#CC3300",
27
- :string_regex => "#33AAAA",
28
- :string_symbol => "#FFCC33",
29
- :number => "#FF6600",
30
- :operator => "#555555",
31
- :operator_word => "bold #000000",
32
- :comment => "italic #0099FF",
33
- :comment_preproc => "noitalic #009999",
34
- :comment_special => "bold",
35
- :generic_deleted => "border:#CC0000 bg:#FFCCCC",
36
- :generic_emph => "italic",
37
- :generic_error => "#FF0000",
38
- :generic_heading => "bold #003300",
39
- :generic_inserted => "border:#00CC00 bg:#CCFFCC",
40
- :generic_output => "#AAAAAA",
41
- :generic_prompt => "bold #000099",
42
- :generic_strong => "bold",
43
- :generic_subheading => "bold #003300",
44
- :generic_traceback => "#99CC66"
45
-
46
- }
47
-
48
- alias Makeup.Styles.HTML.Style
49
-
50
- @style_struct Style.make_style(
51
- short_name: "manni",
52
- long_name: "Manni Style",
53
- background_color: "#f0f3f3",
54
- highlight_color: "#ffffcc",
55
- styles: @styles)
56
-
57
- def style() do
58
- @style_struct
59
- end
60
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/monokai.ex
 
@@ -1,46 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.MonokaiStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :text => "#f8f8f2",
7
- :error => "#960050 bg:#1e0010",
8
- :keyword => "#66d9ef",
9
- :keyword_namespace => "#f92672",
10
- :name => "#f8f8f2",
11
- :name_attribute => "#a6e22e",
12
- :name_class => "#a6e22e",
13
- :name_constant => "#66d9ef",
14
- :name_decorator => "#a6e22e",
15
- :name_exception => "#a6e22e",
16
- :name_function => "#a6e22e",
17
- :name_other => "#a6e22e",
18
- :name_tag => "#f92672",
19
- :literal => "#ae81ff",
20
- :string => "#e6db74",
21
- :string_escape => "#ae81ff",
22
- :number => "#ae81ff",
23
- :operator => "#f92672",
24
- :punctuation => "#f8f8f2",
25
- :comment => "#75715e",
26
- :generic_deleted => "#f92672",
27
- :generic_emph => "italic",
28
- :generic_inserted => "#a6e22e",
29
- :generic_strong => "bold",
30
- :generic_subheading => "#75715e",
31
-
32
- }
33
-
34
- alias Makeup.Styles.HTML.Style
35
-
36
- @style_struct Style.make_style(
37
- short_name: "monokai",
38
- long_name: "Monokai Style",
39
- background_color: "#272822",
40
- highlight_color: "#49483e",
41
- styles: @styles)
42
-
43
- def style() do
44
- @style_struct
45
- end
46
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/murphy.ex
 
@@ -1,68 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.MurphyStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "#F00 bg:#FAA",
7
- :keyword => "bold #289",
8
- :keyword_pseudo => "#08f",
9
- :keyword_type => "#66f",
10
- :name_attribute => "#007",
11
- :name_builtin => "#072",
12
- :name_class => "bold #e9e",
13
- :name_constant => "bold #5ed",
14
- :name_decorator => "bold #555",
15
- :name_entity => "#800",
16
- :name_exception => "bold #F00",
17
- :name_function => "bold #5ed",
18
- :name_label => "bold #970",
19
- :name_namespace => "bold #0e84b5",
20
- :name_tag => "#070",
21
- :name_variable => "#036",
22
- :name_variable_class => "#ccf",
23
- :name_variable_global => "#f84",
24
- :name_variable_instance => "#aaf",
25
- :string => "bg:#e0e0ff",
26
- :string_char => "#88F bg:",
27
- :string_doc => "#D42 bg:",
28
- :string_escape => "bold #666",
29
- :string_interpol => "bg:#eee",
30
- :string_other => "#f88",
31
- :string_regex => "bg:#e0e0ff #000",
32
- :string_symbol => "#fc8 bg:",
33
- :number => "bold #60E",
34
- :number_float => "bold #60E",
35
- :number_hex => "bold #058",
36
- :number_integer => "bold #66f",
37
- :number_oct => "bold #40E",
38
- :operator => "#333",
39
- :operator_word => "bold #000",
40
- :comment => "#666 italic",
41
- :comment_preproc => "#579 noitalic",
42
- :comment_special => "#c00 bold",
43
- :generic_deleted => "#A00000",
44
- :generic_emph => "italic",
45
- :generic_error => "#FF0000",
46
- :generic_heading => "bold #000080",
47
- :generic_inserted => "#00A000",
48
- :generic_output => "#888",
49
- :generic_prompt => "bold #c65d09",
50
- :generic_strong => "bold",
51
- :generic_subheading => "bold #800080",
52
- :generic_traceback => "#04D"
53
-
54
- }
55
-
56
- alias Makeup.Styles.HTML.Style
57
-
58
- @style_struct Style.make_style(
59
- short_name: "murphy",
60
- long_name: "Murphy Style",
61
- background_color: "#ffffff",
62
- highlight_color: "#ffffcc",
63
- styles: @styles)
64
-
65
- def style() do
66
- @style_struct
67
- end
68
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/native.ex
 
@@ -1,51 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.NativeStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "bg:#e3d2d2 #a61717",
7
- :keyword => "bold #6ab825",
8
- :keyword_pseudo => "nobold",
9
- :name_attribute => "#bbbbbb",
10
- :name_builtin => "#24909d",
11
- :name_class => "underline #447fcf",
12
- :name_constant => "#40ffff",
13
- :name_decorator => "#ffa500",
14
- :name_exception => "#bbbbbb",
15
- :name_function => "#447fcf",
16
- :name_namespace => "underline #447fcf",
17
- :name_tag => "bold #6ab825",
18
- :name_variable => "#40ffff",
19
- :string => "#ed9d13",
20
- :string_other => "#ffa500",
21
- :number => "#3677a9",
22
- :operator_word => "bold #6ab825",
23
- :comment => "italic #999999",
24
- :comment_preproc => "noitalic bold #cd2828",
25
- :comment_special => "noitalic bold #e50808 bg:#520000",
26
- :generic_deleted => "#d22323",
27
- :generic_emph => "italic",
28
- :generic_error => "#d22323",
29
- :generic_heading => "bold #ffffff",
30
- :generic_inserted => "#589819",
31
- :generic_output => "#cccccc",
32
- :generic_prompt => "#aaaaaa",
33
- :generic_strong => "bold",
34
- :generic_subheading => "underline #ffffff",
35
- :generic_traceback => "#d22323"
36
-
37
- }
38
-
39
- alias Makeup.Styles.HTML.Style
40
-
41
- @style_struct Style.make_style(
42
- short_name: "native",
43
- long_name: "Native Style",
44
- background_color: "#202020",
45
- highlight_color: "#404040",
46
- styles: @styles)
47
-
48
- def style() do
49
- @style_struct
50
- end
51
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/paraiso-dark.ex
 
@@ -1,54 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.ParaisoDarkStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :text => "#e7e9db",
7
- :error => "#ef6155",
8
- :keyword => "#815ba4",
9
- :keyword_namespace => "#5bc4bf",
10
- :keyword_type => "#fec418",
11
- :name => "#e7e9db",
12
- :name_attribute => "#06b6ef",
13
- :name_class => "#fec418",
14
- :name_constant => "#ef6155",
15
- :name_decorator => "#5bc4bf",
16
- :name_exception => "#ef6155",
17
- :name_function => "#06b6ef",
18
- :name_namespace => "#fec418",
19
- :name_other => "#06b6ef",
20
- :name_tag => "#5bc4bf",
21
- :name_variable => "#ef6155",
22
- :literal => "#f99b15",
23
- :string => "#48b685",
24
- :string_char => "#e7e9db",
25
- :string_doc => "#776e71",
26
- :string_escape => "#f99b15",
27
- :string_interpol => "#f99b15",
28
- :number => "#f99b15",
29
- :operator => "#5bc4bf",
30
- :punctuation => "#e7e9db",
31
- :comment => "#776e71",
32
- :generic_deleted => "#ef6155",
33
- :generic_emph => "italic",
34
- :generic_heading => "bold #e7e9db",
35
- :generic_inserted => "#48b685",
36
- :generic_prompt => "bold #776e71",
37
- :generic_strong => "bold",
38
- :generic_subheading => "bold #5bc4bf",
39
-
40
- }
41
-
42
- alias Makeup.Styles.HTML.Style
43
-
44
- @style_struct Style.make_style(
45
- short_name: "paraiso_dark",
46
- long_name: "ParaisoDark Style",
47
- background_color: "#2f1e2e",
48
- highlight_color: "#4f424c",
49
- styles: @styles)
50
-
51
- def style() do
52
- @style_struct
53
- end
54
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/paraiso-light.ex
 
@@ -1,54 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.ParaisoLightStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :text => "#2f1e2e",
7
- :error => "#ef6155",
8
- :keyword => "#815ba4",
9
- :keyword_namespace => "#5bc4bf",
10
- :keyword_type => "#fec418",
11
- :name => "#2f1e2e",
12
- :name_attribute => "#06b6ef",
13
- :name_class => "#fec418",
14
- :name_constant => "#ef6155",
15
- :name_decorator => "#5bc4bf",
16
- :name_exception => "#ef6155",
17
- :name_function => "#06b6ef",
18
- :name_namespace => "#fec418",
19
- :name_other => "#06b6ef",
20
- :name_tag => "#5bc4bf",
21
- :name_variable => "#ef6155",
22
- :literal => "#f99b15",
23
- :string => "#48b685",
24
- :string_char => "#2f1e2e",
25
- :string_doc => "#8d8687",
26
- :string_escape => "#f99b15",
27
- :string_interpol => "#f99b15",
28
- :number => "#f99b15",
29
- :operator => "#5bc4bf",
30
- :punctuation => "#2f1e2e",
31
- :comment => "#8d8687",
32
- :generic_deleted => "#ef6155",
33
- :generic_emph => "italic",
34
- :generic_heading => "bold #2f1e2e",
35
- :generic_inserted => "#48b685",
36
- :generic_prompt => "bold #8d8687",
37
- :generic_strong => "bold",
38
- :generic_subheading => "bold #5bc4bf",
39
-
40
- }
41
-
42
- alias Makeup.Styles.HTML.Style
43
-
44
- @style_struct Style.make_style(
45
- short_name: "paraiso_light",
46
- long_name: "ParaisoLight Style",
47
- background_color: "#e7e9db",
48
- highlight_color: "#a39e9b",
49
- styles: @styles)
50
-
51
- def style() do
52
- @style_struct
53
- end
54
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/pastie.ex
 
@@ -1,61 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.PastieStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "bg:#e3d2d2 #a61717",
7
- :keyword => "bold #008800",
8
- :keyword_pseudo => "nobold",
9
- :keyword_type => "#888888",
10
- :name_attribute => "#336699",
11
- :name_builtin => "#003388",
12
- :name_class => "bold #bb0066",
13
- :name_constant => "bold #003366",
14
- :name_decorator => "#555555",
15
- :name_exception => "bold #bb0066",
16
- :name_function => "bold #0066bb",
17
- :name_property => "bold #336699",
18
- :name_label => "italic #336699",
19
- :name_namespace => "bold #bb0066",
20
- :name_tag => "bold #bb0066",
21
- :name_variable => "#336699",
22
- :name_variable_class => "#336699",
23
- :name_variable_global => "#dd7700",
24
- :name_variable_instance => "#3333bb",
25
- :string => "bg:#fff0f0 #dd2200",
26
- :string_escape => "#0044dd",
27
- :string_interpol => "#3333bb",
28
- :string_other => "bg:#f0fff0 #22bb22",
29
- :string_regex => "bg:#fff0ff #008800",
30
- :string_symbol => "#aa6600",
31
- :number => "bold #0000DD",
32
- :operator_word => "#008800",
33
- :comment => "#888888",
34
- :comment_preproc => "bold #cc0000",
35
- :comment_special => "bg:#fff0f0 bold #cc0000",
36
- :generic_deleted => "bg:#ffdddd #000000",
37
- :generic_emph => "italic",
38
- :generic_error => "#aa0000",
39
- :generic_heading => "#333",
40
- :generic_inserted => "bg:#ddffdd #000000",
41
- :generic_output => "#888888",
42
- :generic_prompt => "#555555",
43
- :generic_strong => "bold",
44
- :generic_subheading => "#666",
45
- :generic_traceback => "#aa0000"
46
-
47
- }
48
-
49
- alias Makeup.Styles.HTML.Style
50
-
51
- @style_struct Style.make_style(
52
- short_name: "pastie",
53
- long_name: "Pastie Style",
54
- background_color: "#ffffff",
55
- highlight_color: "#ffffcc",
56
- styles: @styles)
57
-
58
- def style() do
59
- @style_struct
60
- end
61
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/perldoc.ex
 
@@ -1,53 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.PerldocStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "bg:#e3d2d2 #a61717",
7
- :keyword => "#8B008B bold",
8
- :keyword_type => "#00688B",
9
- :name_attribute => "#658b00",
10
- :name_builtin => "#658b00",
11
- :name_class => "#008b45 bold",
12
- :name_constant => "#00688B",
13
- :name_decorator => "#707a7c",
14
- :name_exception => "#008b45 bold",
15
- :name_function => "#008b45",
16
- :name_namespace => "#008b45 underline",
17
- :name_tag => "#8B008B bold",
18
- :name_variable => "#00688B",
19
- :string => "#CD5555",
20
- :string_heredoc => "#1c7e71 italic",
21
- :string_other => "#cb6c20",
22
- :string_regex => "#1c7e71",
23
- :number => "#B452CD",
24
- :operator_word => "#8B008B",
25
- :comment => "#228B22",
26
- :comment_preproc => "#1e889b",
27
- :comment_special => "#8B008B bold",
28
- :generic_deleted => "#aa0000",
29
- :generic_emph => "italic",
30
- :generic_error => "#aa0000",
31
- :generic_heading => "bold #000080",
32
- :generic_inserted => "#00aa00",
33
- :generic_output => "#888888",
34
- :generic_prompt => "#555555",
35
- :generic_strong => "bold",
36
- :generic_subheading => "bold #800080",
37
- :generic_traceback => "#aa0000"
38
-
39
- }
40
-
41
- alias Makeup.Styles.HTML.Style
42
-
43
- @style_struct Style.make_style(
44
- short_name: "perldoc",
45
- long_name: "Perldoc Style",
46
- background_color: "#eeeedd",
47
- highlight_color: "#ffffcc",
48
- styles: @styles)
49
-
50
- def style() do
51
- @style_struct
52
- end
53
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/rainbow_dash.ex
 
@@ -1,56 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.RainbowDashStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :text => "#4d4d4d",
7
- :error => "bg:#cc0000 #ffffff",
8
- :keyword => "bold #2c5dcd",
9
- :keyword_pseudo => "nobold",
10
- :keyword_type => "#5918bb",
11
- :name_attribute => "italic #2c5dcd",
12
- :name_builtin => "bold #5918bb",
13
- :name_class => "underline",
14
- :name_constant => "#318495",
15
- :name_decorator => "bold #ff8000",
16
- :name_entity => "bold #5918bb",
17
- :name_exception => "bold #5918bb",
18
- :name_function => "bold #ff8000",
19
- :name_tag => "bold #2c5dcd",
20
- :string => "#00cc66",
21
- :string_doc => "italic",
22
- :string_escape => "bold #c5060b",
23
- :string_other => "#318495",
24
- :string_symbol => "bold #c5060b",
25
- :number => "bold #5918bb",
26
- :operator => "#2c5dcd",
27
- :operator_word => "bold",
28
- :comment => "italic #0080ff",
29
- :comment_preproc => "noitalic",
30
- :comment_special => "bold",
31
- :generic_deleted => "border:#c5060b bg:#ffcccc",
32
- :generic_emph => "italic",
33
- :generic_error => "#ff0000",
34
- :generic_heading => "bold #2c5dcd",
35
- :generic_inserted => "border:#00cc00 bg:#ccffcc",
36
- :generic_output => "#aaaaaa",
37
- :generic_prompt => "bold #2c5dcd",
38
- :generic_strong => "bold",
39
- :generic_subheading => "bold #2c5dcd",
40
- :generic_traceback => "#c5060b"
41
-
42
- }
43
-
44
- alias Makeup.Styles.HTML.Style
45
-
46
- @style_struct Style.make_style(
47
- short_name: "rainbow_dash",
48
- long_name: "RainbowDash Style",
49
- background_color: "#ffffff",
50
- highlight_color: "#ffffcc",
51
- styles: @styles)
52
-
53
- def style() do
54
- @style_struct
55
- end
56
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/rrt.ex
 
@@ -1,29 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.RrtStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :keyword => "#ff0000",
7
- :keyword_type => "#ee82ee",
8
- :name_constant => "#7fffd4",
9
- :name_function => "#ffff00",
10
- :name_variable => "#eedd82",
11
- :string => "#87ceeb",
12
- :comment => "#00ff00",
13
- :comment_preproc => "#e5e5e5",
14
-
15
- }
16
-
17
- alias Makeup.Styles.HTML.Style
18
-
19
- @style_struct Style.make_style(
20
- short_name: "rrt",
21
- long_name: "Rrt Style",
22
- background_color: "#000000",
23
- highlight_color: "#0000ff",
24
- styles: @styles)
25
-
26
- def style() do
27
- @style_struct
28
- end
29
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/samba.ex
 
@@ -1,87 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.SambaStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "#a40000 border:#ef2929",
7
- :other => "#000000",
8
- :keyword => "bold #204a87",
9
- :keyword_constant => "bold #204a87",
10
- :keyword_declaration => "bold #204a87",
11
- :keyword_namespace => "bold #204a87",
12
- :keyword_pseudo => "bold #204a87",
13
- :keyword_reserved => "bold #204a87",
14
- :keyword_type => "bold #204a87",
15
- :name => "#000000",
16
- :name_attribute => "#c4a000",
17
- :name_builtin => "#204a87",
18
- :name_builtin_pseudo => "#3465a4",
19
- :name_class => "#5c35cc",
20
- :name_constant => "#000000",
21
- :name_decorator => "bold #5c35cc",
22
- :name_entity => "#ce5c00",
23
- :name_exception => "bold #cc0000",
24
- :name_function => "#000000",
25
- :name_property => "#000000",
26
- :name_label => "#f57900",
27
- :name_namespace => "#000000",
28
- :name_other => "#000000",
29
- :name_tag => "bold #204a87",
30
- :name_variable => "#000000",
31
- :name_variable_class => "#000000",
32
- :name_variable_global => "#000000",
33
- :name_variable_instance => "#000000",
34
- :literal => "#000000",
35
- :string => "#4e9a06",
36
- :string_backtick => "#4e9a06",
37
- :string_char => "#4e9a06",
38
- :string_doc => "italic #8f5902",
39
- :string_double => "#4e9a06",
40
- :string_escape => "#4e9a06",
41
- :string_heredoc => "#4e9a06",
42
- :string_interpol => "#4e9a06",
43
- :string_other => "#4e9a06",
44
- :string_regex => "#4e9a06",
45
- :string_single => "#4e9a06",
46
- :string_symbol => "#4e9a06",
47
- :number => "bold #0000cf",
48
- :number_float => "bold #0000cf",
49
- :number_hex => "bold #0000cf",
50
- :number_integer => "bold #0000cf",
51
- :number_integer_long => "bold #0000cf",
52
- :number_oct => "bold #0000cf",
53
- :operator => "bold #ce5c00",
54
- :operator_word => "bold #204a87",
55
- :punctuation => "#000000",
56
- :comment => "#8e908c",
57
- :comment_multiline => "#8e908c",
58
- :comment_preproc => "#8e908c",
59
- :comment_single => "#8e908c",
60
- :comment_special => "#8e908c",
61
- :generic => "#000000",
62
- :generic_deleted => "#a40000",
63
- :generic_emph => "italic #000000",
64
- :generic_error => "#ef2929",
65
- :generic_heading => "bold #000080",
66
- :generic_inserted => "#00A000",
67
- :generic_output => "italic #000000",
68
- :generic_prompt => "#8f5902",
69
- :generic_strong => "bold #000000",
70
- :generic_subheading => "bold #800080",
71
- :generic_traceback => "bold #a40000"
72
-
73
- }
74
-
75
- alias Makeup.Styles.HTML.Style
76
-
77
- @style_struct Style.make_style(
78
- short_name: "samba",
79
- long_name: "Samba Style",
80
- background_color: "#f8f8f8",
81
- highlight_color: "#ffffcc",
82
- styles: @styles)
83
-
84
- def style() do
85
- @style_struct
86
- end
87
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/tango.ex
 
@@ -1,86 +0,0 @@
1
- defmodule Makeup.Styles.HTML.TangoStyle do
2
- @moduledoc false
3
-
4
- @styles %{
5
- :error => "#a40000 border:#ef2929",
6
- :other => "#000000",
7
- :keyword => "bold #204a87",
8
- :keyword_constant => "bold #204a87",
9
- :keyword_declaration => "bold #204a87",
10
- :keyword_namespace => "bold #204a87",
11
- :keyword_pseudo => "bold #204a87",
12
- :keyword_reserved => "bold #204a87",
13
- :keyword_type => "bold #204a87",
14
- :name => "#000000",
15
- :name_attribute => "#c4a000",
16
- :name_builtin => "#204a87",
17
- :name_builtin_pseudo => "#3465a4",
18
- :name_class => "#000000",
19
- :name_constant => "#000000",
20
- :name_decorator => "bold #5c35cc",
21
- :name_entity => "#ce5c00",
22
- :name_exception => "bold #cc0000",
23
- :name_function => "#000000",
24
- :name_property => "#000000",
25
- :name_label => "#f57900",
26
- :name_namespace => "#000000",
27
- :name_other => "#000000",
28
- :name_tag => "bold #204a87",
29
- :name_variable => "#000000",
30
- :name_variable_class => "#000000",
31
- :name_variable_global => "#000000",
32
- :name_variable_instance => "#000000",
33
- :literal => "#000000",
34
- :string => "#4e9a06",
35
- :string_backtick => "#4e9a06",
36
- :string_char => "#4e9a06",
37
- :string_doc => "italic #8f5902",
38
- :string_double => "#4e9a06",
39
- :string_escape => "#4e9a06",
40
- :string_heredoc => "#4e9a06",
41
- :string_interpol => "#4e9a06",
42
- :string_other => "#4e9a06",
43
- :string_regex => "#4e9a06",
44
- :string_single => "#4e9a06",
45
- :string_symbol => "#4e9a06",
46
- :number => "bold #0000cf",
47
- :number_float => "bold #0000cf",
48
- :number_hex => "bold #0000cf",
49
- :number_integer => "bold #0000cf",
50
- :number_integer_long => "bold #0000cf",
51
- :number_oct => "bold #0000cf",
52
- :operator => "bold #ce5c00",
53
- :operator_word => "bold #204a87",
54
- :punctuation => "bold #000000",
55
- :comment => "italic #8f5902",
56
- :comment_multiline => "italic #8f5902",
57
- :comment_preproc => "italic #8f5902",
58
- :comment_single => "italic #8f5902",
59
- :comment_special => "italic #8f5902",
60
- :generic => "#000000",
61
- :generic_deleted => "#a40000",
62
- :generic_emph => "italic #000000",
63
- :generic_error => "#ef2929",
64
- :generic_heading => "bold #000080",
65
- :generic_inserted => "#00A000",
66
- :generic_output => "italic #000000",
67
- :generic_prompt => "#8f5902",
68
- :generic_strong => "bold #000000",
69
- :generic_subheading => "bold #800080",
70
- :generic_traceback => "bold #a40000"
71
-
72
- }
73
-
74
- alias Makeup.Styles.HTML.Style
75
-
76
- @style_struct Style.make_style(
77
- short_name: "tango",
78
- long_name: "Tango Style",
79
- background_color: "#f8f8f8",
80
- highlight_color: "#ffffcc",
81
- styles: @styles)
82
-
83
- def style() do
84
- @style_struct
85
- end
86
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/trac.ex
 
@@ -1,51 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.TracStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "bg:#e3d2d2 #a61717",
7
- :keyword => "bold",
8
- :keyword_type => "#445588",
9
- :name_attribute => "#008080",
10
- :name_builtin => "#999999",
11
- :name_class => "bold #445588",
12
- :name_constant => "#008080",
13
- :name_entity => "#800080",
14
- :name_exception => "bold #990000",
15
- :name_function => "bold #990000",
16
- :name_namespace => "#555555",
17
- :name_tag => "#000080",
18
- :name_variable => "#008080",
19
- :string => "#bb8844",
20
- :string_regex => "#808000",
21
- :number => "#009999",
22
- :operator => "bold",
23
- :comment => "italic #999988",
24
- :comment_preproc => "bold noitalic #999999",
25
- :comment_special => "bold #999999",
26
- :generic_deleted => "bg:#ffdddd #000000",
27
- :generic_emph => "italic",
28
- :generic_error => "#aa0000",
29
- :generic_heading => "#999999",
30
- :generic_inserted => "bg:#ddffdd #000000",
31
- :generic_output => "#888888",
32
- :generic_prompt => "#555555",
33
- :generic_strong => "bold",
34
- :generic_subheading => "#aaaaaa",
35
- :generic_traceback => "#aa0000"
36
-
37
- }
38
-
39
- alias Makeup.Styles.HTML.Style
40
-
41
- @style_struct Style.make_style(
42
- short_name: "trac",
43
- long_name: "Trac Style",
44
- background_color: "#ffffff",
45
- highlight_color: "#ffffcc",
46
- styles: @styles)
47
-
48
- def style() do
49
- @style_struct
50
- end
51
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/vim.ex
 
@@ -1,46 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.VimStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "border:#FF0000",
7
- :keyword => "#cdcd00",
8
- :keyword_declaration => "#00cd00",
9
- :keyword_namespace => "#cd00cd",
10
- :keyword_type => "#00cd00",
11
- :name_builtin => "#cd00cd",
12
- :name_class => "#00cdcd",
13
- :name_exception => "bold #666699",
14
- :name_variable => "#00cdcd",
15
- :string => "#cd0000",
16
- :number => "#cd00cd",
17
- :operator => "#3399cc",
18
- :operator_word => "#cdcd00",
19
- :comment => "#000080",
20
- :comment_special => "bold #cd0000",
21
- :generic_deleted => "#cd0000",
22
- :generic_emph => "italic",
23
- :generic_error => "#FF0000",
24
- :generic_heading => "bold #000080",
25
- :generic_inserted => "#00cd00",
26
- :generic_output => "#888",
27
- :generic_prompt => "bold #000080",
28
- :generic_strong => "bold",
29
- :generic_subheading => "bold #800080",
30
- :generic_traceback => "#04D"
31
-
32
- }
33
-
34
- alias Makeup.Styles.HTML.Style
35
-
36
- @style_struct Style.make_style(
37
- short_name: "vim",
38
- long_name: "Vim Style",
39
- background_color: "#000000",
40
- highlight_color: "#222222",
41
- styles: @styles)
42
-
43
- def style() do
44
- @style_struct
45
- end
46
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/vs.ex
 
@@ -1,34 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.VisualStudioStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "border:#FF0000",
7
- :keyword => "#0000ff",
8
- :keyword_type => "#2b91af",
9
- :name_class => "#2b91af",
10
- :string => "#a31515",
11
- :operator_word => "#0000ff",
12
- :comment => "#008000",
13
- :comment_preproc => "#0000ff",
14
- :generic_emph => "italic",
15
- :generic_heading => "bold",
16
- :generic_prompt => "bold",
17
- :generic_strong => "bold",
18
- :generic_subheading => "bold",
19
-
20
- }
21
-
22
- alias Makeup.Styles.HTML.Style
23
-
24
- @style_struct Style.make_style(
25
- short_name: "vs",
26
- long_name: "VisualStudio Style",
27
- background_color: "#ffffff",
28
- highlight_color: "#ffffcc",
29
- styles: @styles)
30
-
31
- def style() do
32
- @style_struct
33
- end
34
- end
\ No newline at end of file
removed lib/makeup/styles/html/pygments/xcode.ex
 
@@ -1,40 +0,0 @@
1
-
2
- defmodule Makeup.Styles.HTML.XcodeStyle do
3
- @moduledoc false
4
-
5
- @styles %{
6
- :error => "#000000",
7
- :keyword => "#A90D91",
8
- :name => "#000000",
9
- :name_attribute => "#836C28",
10
- :name_builtin => "#A90D91",
11
- :name_builtin_pseudo => "#5B269A",
12
- :name_class => "#3F6E75",
13
- :name_decorator => "#000000",
14
- :name_function => "#000000",
15
- :name_label => "#000000",
16
- :name_tag => "#000000",
17
- :name_variable => "#000000",
18
- :literal => "#1C01CE",
19
- :string => "#C41A16",
20
- :string_char => "#2300CE",
21
- :number => "#1C01CE",
22
- :operator => "#000000",
23
- :comment => "#177500",
24
- :comment_preproc => "#633820",
25
-
26
- }
27
-
28
- alias Makeup.Styles.HTML.Style
29
-
30
- @style_struct Style.make_style(
31
- short_name: "xcode",
32
- long_name: "Xcode Style",
33
- background_color: "#ffffff",
34
- highlight_color: "#ffffcc",
35
- styles: @styles)
36
-
37
- def style() do
38
- @style_struct
39
- end
40
- end
\ No newline at end of file
added lib/makeup/styles/html/style.ex
 
@@ -0,0 +1,137 @@
1
+ defmodule Makeup.Styles.HTML.Style do
2
+ @moduledoc """
3
+ The style struct.
4
+ """
5
+
6
+ defstruct long_name: "",
7
+ short_name: "",
8
+ background_color: "#ffffff",
9
+ highlight_color: "#ffffcc",
10
+ styles: []
11
+
12
+ alias Makeup.Styles.HTML.TokenStyle
13
+ require Makeup.Token.Utils
14
+ alias Makeup.Token.Utils
15
+
16
+ defp handle_inheritance(style_map) do
17
+ # Handles insheritance between styles.
18
+ # This is automatic in Pygments' design, because they use class inheritance for tokens.
19
+ # We don't have class inheritance in elixir, so we must have something else.
20
+ # Here, we use a manually build hierarchy to fake inheritance.
21
+ #
22
+ # In any case, the goal is to have flat tokens at runtime.
23
+ # This function is only called at compile time.
24
+ Enum.reduce(Utils.precedence(), style_map, fn {parent_key, child_keys}, style_map ->
25
+ parent_style = style_map[parent_key]
26
+
27
+ Enum.reduce(child_keys, style_map, fn child_key, style_map ->
28
+ child_style = style_map[child_key]
29
+
30
+ Map.put(
31
+ style_map,
32
+ child_key,
33
+ Map.merge(
34
+ parent_style,
35
+ child_style,
36
+ fn _k, v1, v2 -> v2 || v1 end
37
+ )
38
+ )
39
+ end)
40
+ end)
41
+ end
42
+
43
+ require EEx
44
+
45
+ EEx.function_from_string(
46
+ :defp,
47
+ :render_css,
48
+ """
49
+ .<%= highlight_class %> .hll {background-color: <%= highlight_color %>}
50
+ .<%= highlight_class %> {\
51
+ <%= if token_text.color do %>color: <%= token_text.color %>; <% end %>\
52
+ <%= if token_text.font_style do %>font-style: <%= token_text.font_style %>; <% end %>\
53
+ <%= if token_text.font_weight do %>font-weight: <%= token_text.font_weight %>; <% end %>\
54
+ <%= if token_text.border do %>border: <%= token_text.border %>; <% end %>\
55
+ <%= if token_text.text_decoration do %>text-decoration: <%= token_text.text_decoration %>; <% end %>\
56
+ <%= if background_color do %>background-color: <%= background_color %><% end %>}\
57
+ .<%= highlight_class %> .unselectable {
58
+ -webkit-touch-callout: none;
59
+ -webkit-user-select: none;
60
+ -khtml-user-select: none;
61
+ -moz-user-select: none;
62
+ -ms-user-select: none;
63
+ user-select: none;
64
+ }
65
+ <%= for {css_class, token_style, token_type} <- styles do %>
66
+ .<%= highlight_class %> .<%= css_class %> {\
67
+ <%= if token_style.color do %>color: <%= token_style.color %>; <% end %>\
68
+ <%= if token_style.font_style do %>font-style: <%= token_style.font_style %>; <% end %>\
69
+ <%= if token_style.font_weight do %>font-weight: <%= token_style.font_weight %>; <% end %>\
70
+ <%= if token_style.border do %>border: <%= token_style.border %>; <% end %>\
71
+ <%= if token_style.text_decoration do %>text-decoration: <%= token_style.text_decoration %>; <% end %>\
72
+ <%= if token_style.background_color do %>background-color: <%= token_style.background_color %>; <% end %>\
73
+ } /* :<%= Atom.to_string(token_type) %> */\
74
+ <% end %>
75
+ """,
76
+ [:highlight_class, :highlight_color, :background_color, :token_text, :styles]
77
+ )
78
+
79
+ @doc """
80
+ Generate a stylesheet for a style.
81
+ """
82
+ def stylesheet(style, css_class \\ "highlight") do
83
+ token_styles =
84
+ style.styles
85
+ |> Map.delete(:text)
86
+ |> Enum.into([])
87
+ |> Enum.map(fn {token_type, token_style} ->
88
+ css_class = Makeup.Token.Utils.css_class_for_token_type(token_type)
89
+ {css_class, token_style, token_type}
90
+ end)
91
+ |> Enum.filter(fn {_, token_style, _} ->
92
+ Makeup.Styles.HTML.TokenStyle.not_empty?(token_style)
93
+ end)
94
+ |> Enum.sort()
95
+
96
+ token_text = style.styles[:text]
97
+
98
+ render_css(
99
+ css_class,
100
+ style.highlight_color,
101
+ style.background_color,
102
+ token_text,
103
+ token_styles
104
+ )
105
+ end
106
+
107
+ @doc """
108
+ Creates a new style.
109
+
110
+ Takes care of unspecified token types and inheritance.
111
+ Writes and caches a CSS stylesheet for the style.
112
+ """
113
+ def make_style(options \\ []) do
114
+ short_name = Keyword.fetch!(options, :short_name)
115
+ long_name = Keyword.fetch!(options, :long_name)
116
+ background_color = Keyword.fetch!(options, :background_color)
117
+ highlight_color = Keyword.fetch!(options, :highlight_color)
118
+ incomplete_style_map = Keyword.fetch!(options, :styles)
119
+
120
+ complete_style_map =
121
+ Utils.standard_token_types()
122
+ |> Enum.map(fn k -> {k, ""} end)
123
+ |> Enum.into(%{})
124
+ |> Map.merge(incomplete_style_map)
125
+ |> Enum.map(fn {k, v} -> {k, TokenStyle.from_string(v)} end)
126
+ |> Enum.into(%{})
127
+ |> handle_inheritance
128
+
129
+ %__MODULE__{
130
+ long_name: long_name,
131
+ short_name: short_name,
132
+ background_color: background_color,
133
+ highlight_color: highlight_color,
134
+ styles: complete_style_map
135
+ }
136
+ end
137
+ end
changed lib/makeup/styles/html/style_map.ex
 
@@ -5,161 +5,1392 @@ defmodule Makeup.Styles.HTML.StyleMap do
5
5
Style names are of the form `<name>_style`.
6
6
"""
7
7
8
- alias Makeup.Styles.HTML
8
+ alias Makeup.Styles.HTML.Style
9
9
10
10
# %% Start Pygments %%
11
11
12
- @doc """
13
- The *abap* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#abap).
14
- """
15
- def abap_style, do: HTML.AbapStyle.style()
12
+ @abap_style Style.make_style(
13
+ short_name: "abap",
14
+ long_name: "Abap Style",
15
+ background_color: "#ffffff",
16
+ highlight_color: "#ffffcc",
17
+ styles: %{
18
+ :error => "#F00",
19
+ :keyword => "#00f",
20
+ :name => "#000",
21
+ :string => "#5a2",
22
+ :number => "#3af",
23
+ :operator_word => "#00f",
24
+ :comment => "italic #888",
25
+ :comment_special => "#888"
26
+ }
27
+ )
16
28
17
29
@doc """
18
- The *algol* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#algol).
30
+ The *abap* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#abap).
19
31
"""
20
- def algol_style, do: HTML.AlgolStyle.style()
32
+ def abap_style, do: @abap_style
33
+
34
+ @algol_style Style.make_style(
35
+ short_name: "algol",
36
+ long_name: "Algol Style",
37
+ background_color: "#ffffff",
38
+ highlight_color: "#ffffcc",
39
+ styles: %{
40
+ :error => "border:#FF0000",
41
+ :keyword => "underline bold",
42
+ :keyword_declaration => "italic",
43
+ :name_builtin => "bold italic",
44
+ :name_builtin_pseudo => "bold italic",
45
+ :name_class => "bold italic #666",
46
+ :name_constant => "bold italic #666",
47
+ :name_function => "bold italic #666",
48
+ :name_namespace => "bold italic #666",
49
+ :name_variable => "bold italic #666",
50
+ :string => "italic #666",
51
+ :operator_word => "bold",
52
+ :comment => "italic #888",
53
+ :comment_preproc => "bold noitalic #888",
54
+ :comment_special => "bold noitalic #888"
55
+ }
56
+ )
21
57
22
58
@doc """
23
- The *algol_nu* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#algol_nu).
59
+ The *algol* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#algol).
24
60
"""
25
- def algol_nu_style, do: HTML.Algol_NuStyle.style()
61
+ def algol_style, do: @algol_style
62
+
63
+ @algol_nu_style Style.make_style(
64
+ short_name: "algol_nu",
65
+ long_name: "Algol_Nu Style",
66
+ background_color: "#ffffff",
67
+ highlight_color: "#ffffcc",
68
+ styles: %{
69
+ :error => "border:#FF0000",
70
+ :keyword => "bold",
71
+ :keyword_declaration => "italic",
72
+ :name_builtin => "bold italic",
73
+ :name_builtin_pseudo => "bold italic",
74
+ :name_class => "bold italic #666",
75
+ :name_constant => "bold italic #666",
76
+ :name_function => "bold italic #666",
77
+ :name_namespace => "bold italic #666",
78
+ :name_variable => "bold italic #666",
79
+ :string => "italic #666",
80
+ :operator_word => "bold",
81
+ :comment => "italic #888",
82
+ :comment_preproc => "bold noitalic #888",
83
+ :comment_special => "bold noitalic #888"
84
+ }
85
+ )
26
86
27
87
@doc """
28
- The *arduino* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#arduino).
88
+ The *algol_nu* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#algol_nu).
29
89
"""
30
- def arduino_style, do: HTML.ArduinoStyle.style()
90
+ def algol_nu_style, do: @algol_nu_style
91
+
92
+ @arduino_style Style.make_style(
93
+ short_name: "arduino",
94
+ long_name: "Arduino Style",
95
+ background_color: "#ffffff",
96
+ highlight_color: "#ffffcc",
97
+ styles: %{
98
+ :error => "#a61717",
99
+ :keyword => "#728E00",
100
+ :keyword_constant => "#00979D",
101
+ :keyword_pseudo => "#00979D",
102
+ :keyword_reserved => "#00979D",
103
+ :keyword_type => "#00979D",
104
+ :name => "#434f54",
105
+ :name_builtin => "#728E00",
106
+ :name_function => "#D35400",
107
+ :name_other => "#728E00",
108
+ :string => "#7F8C8D",
109
+ :number => "#8A7B52",
110
+ :operator => "#728E00",
111
+ :comment => "#95a5a6",
112
+ :comment_preproc => "#728E00"
113
+ }
114
+ )
31
115
32
116
@doc """
33
- The *autumn* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#autumn).
117
+ The *arduino* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#arduino).
34
118
"""
35
- def autumn_style, do: HTML.AutumnStyle.style()
119
+ def arduino_style, do: @arduino_style
120
+
121
+ @autumn_style Style.make_style(
122
+ short_name: "autumn",
123
+ long_name: "Autumn Style",
124
+ background_color: "#ffffff",
125
+ highlight_color: "#ffffcc",
126
+ styles: %{
127
+ :error => "#F00 bg:#FAA",
128
+ :keyword => "#0000aa",
129
+ :keyword_type => "#00aaaa",
130
+ :name_attribute => "#1e90ff",
131
+ :name_builtin => "#00aaaa",
132
+ :name_class => "underline #00aa00",
133
+ :name_constant => "#aa0000",
134
+ :name_decorator => "#888888",
135
+ :name_entity => "bold #800",
136
+ :name_function => "#00aa00",
137
+ :name_namespace => "underline #00aaaa",
138
+ :name_tag => "bold #1e90ff",
139
+ :name_variable => "#aa0000",
140
+ :string => "#aa5500",
141
+ :string_regex => "#009999",
142
+ :string_symbol => "#0000aa",
143
+ :number => "#009999",
144
+ :operator_word => "#0000aa",
145
+ :comment => "italic #aaaaaa",
146
+ :comment_preproc => "noitalic #4c8317",
147
+ :comment_special => "italic #0000aa",
148
+ :generic_deleted => "#aa0000",
149
+ :generic_emph => "italic",
150
+ :generic_error => "#aa0000",
151
+ :generic_heading => "bold #000080",
152
+ :generic_inserted => "#00aa00",
153
+ :generic_output => "#888888",
154
+ :generic_prompt => "#555555",
155
+ :generic_strong => "bold",
156
+ :generic_subheading => "bold #800080",
157
+ :generic_traceback => "#aa0000"
158
+ }
159
+ )
36
160
37
161
@doc """
38
- The *borland* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#borland).
162
+ The *autumn* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#autumn).
39
163
"""
40
- def borland_style, do: HTML.BorlandStyle.style()
164
+ def autumn_style, do: @autumn_style
165
+
166
+ @borland_style Style.make_style(
167
+ short_name: "borland",
168
+ long_name: "Borland Style",
169
+ background_color: "#ffffff",
170
+ highlight_color: "#ffffcc",
171
+ styles: %{
172
+ :error => "bg:#e3d2d2 #a61717",
173
+ :keyword => "bold #000080",
174
+ :name_attribute => "#FF0000",
175
+ :name_tag => "bold #000080",
176
+ :string => "#0000FF",
177
+ :string_char => "#800080",
178
+ :number => "#0000FF",
179
+ :operator_word => "bold",
180
+ :comment => "italic #008800",
181
+ :comment_preproc => "noitalic #008080",
182
+ :comment_special => "noitalic bold",
183
+ :generic_deleted => "bg:#ffdddd #000000",
184
+ :generic_emph => "italic",
185
+ :generic_error => "#aa0000",
186
+ :generic_heading => "#999999",
187
+ :generic_inserted => "bg:#ddffdd #000000",
188
+ :generic_output => "#888888",
189
+ :generic_prompt => "#555555",
190
+ :generic_strong => "bold",
191
+ :generic_subheading => "#aaaaaa",
192
+ :generic_traceback => "#aa0000"
193
+ }
194
+ )
41
195
42
196
@doc """
43
- The *bw* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#bw).
197
+ The *borland* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#borland).
44
198
"""
45
- def bw_style, do: HTML.BlackWhiteStyle.style()
199
+ def borland_style, do: @borland_style
200
+
201
+ @bw_style Style.make_style(
202
+ short_name: "bw",
203
+ long_name: "BlackWhite Style",
204
+ background_color: "#ffffff",
205
+ highlight_color: "#ffffcc",
206
+ styles: %{
207
+ :error => "border:#FF0000",
208
+ :keyword => "bold",
209
+ :keyword_pseudo => "nobold",
210
+ :keyword_type => "nobold",
211
+ :name_class => "bold",
212
+ :name_entity => "bold",
213
+ :name_exception => "bold",
214
+ :name_namespace => "bold",
215
+ :name_tag => "bold",
216
+ :string => "italic",
217
+ :string_escape => "bold",
218
+ :string_interpol => "bold",
219
+ :operator_word => "bold",
220
+ :comment => "italic",
221
+ :comment_preproc => "noitalic",
222
+ :generic_emph => "italic",
223
+ :generic_heading => "bold",
224
+ :generic_prompt => "bold",
225
+ :generic_strong => "bold",
226
+ :generic_subheading => "bold"
227
+ }
228
+ )
46
229
47
230
@doc """
48
- The *colorful* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#colorful).
231
+ The *bw* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#bw).
49
232
"""
50
- def colorful_style, do: HTML.ColorfulStyle.style()
233
+ def bw_style, do: @bw_style
234
+
235
+ @colorful_style Style.make_style(
236
+ short_name: "colorful",
237
+ long_name: "Colorful Style",
238
+ background_color: "#ffffff",
239
+ highlight_color: "#ffffcc",
240
+ styles: %{
241
+ :error => "#F00 bg:#FAA",
242
+ :keyword => "bold #080",
243
+ :keyword_pseudo => "#038",
244
+ :keyword_type => "#339",
245
+ :name_attribute => "#00C",
246
+ :name_builtin => "#007020",
247
+ :name_class => "bold #B06",
248
+ :name_constant => "bold #036",
249
+ :name_decorator => "bold #555",
250
+ :name_entity => "bold #800",
251
+ :name_exception => "bold #F00",
252
+ :name_function => "bold #06B",
253
+ :name_label => "bold #970",
254
+ :name_namespace => "bold #0e84b5",
255
+ :name_tag => "#070",
256
+ :name_variable => "#963",
257
+ :name_variable_class => "#369",
258
+ :name_variable_global => "bold #d70",
259
+ :name_variable_instance => "#33B",
260
+ :string => "bg:#fff0f0",
261
+ :string_char => "#04D bg:",
262
+ :string_doc => "#D42 bg:",
263
+ :string_escape => "bold #666",
264
+ :string_interpol => "bg:#eee",
265
+ :string_other => "#D20",
266
+ :string_regex => "bg:#fff0ff #000",
267
+ :string_symbol => "#A60 bg:",
268
+ :number => "bold #60E",
269
+ :number_float => "bold #60E",
270
+ :number_hex => "bold #058",
271
+ :number_integer => "bold #00D",
272
+ :number_oct => "bold #40E",
273
+ :operator => "#333",
274
+ :operator_word => "bold #000",
275
+ :comment => "#888",
276
+ :comment_preproc => "#579",
277
+ :comment_special => "bold #cc0000",
278
+ :generic_deleted => "#A00000",
279
+ :generic_emph => "italic",
280
+ :generic_error => "#FF0000",
281
+ :generic_heading => "bold #000080",
282
+ :generic_inserted => "#00A000",
283
+ :generic_output => "#888",
284
+ :generic_prompt => "bold #c65d09",
285
+ :generic_strong => "bold",
286
+ :generic_subheading => "bold #800080",
287
+ :generic_traceback => "#04D"
288
+ }
289
+ )
51
290
52
291
@doc """
53
- The *default* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#default).
292
+ The *colorful* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#colorful).
54
293
"""
55
- def default_style, do: HTML.DefaultStyle.style()
294
+ def colorful_style, do: @colorful_style
295
+
296
+ @default_style Style.make_style(
297
+ short_name: "default",
298
+ long_name: "Default Style",
299
+ background_color: "#f8f8f8",
300
+ highlight_color: "#ffffcc",
301
+ styles: %{
302
+ :error => "border:#FF0000",
303
+ :keyword => "bold #008000",
304
+ :keyword_pseudo => "nobold",
305
+ :keyword_type => "nobold #B00040",
306
+ :name_attribute => "#7D9029",
307
+ :name_builtin => "#008000",
308
+ :name_class => "bold #0000FF",
309
+ :name_constant => "#880000",
310
+ :name_decorator => "#AA22FF",
311
+ :name_entity => "bold #999999",
312
+ :name_exception => "bold #D2413A",
313
+ :name_function => "#0000FF",
314
+ :name_label => "#A0A000",
315
+ :name_namespace => "bold #0000FF",
316
+ :name_tag => "bold #008000",
317
+ :name_variable => "#19177C",
318
+ :string => "#BA2121",
319
+ :string_doc => "italic",
320
+ :string_escape => "bold #BB6622",
321
+ :string_interpol => "bold #BB6688",
322
+ :string_other => "#008000",
323
+ :string_regex => "#BB6688",
324
+ :string_symbol => "#19177C",
325
+ :number => "#666666",
326
+ :operator => "#666666",
327
+ :operator_word => "bold #AA22FF",
328
+ :comment => "italic #408080",
329
+ :comment_preproc => "noitalic #BC7A00",
330
+ :generic_deleted => "#A00000",
331
+ :generic_emph => "italic",
332
+ :generic_error => "#FF0000",
333
+ :generic_heading => "bold #000080",
334
+ :generic_inserted => "#00A000",
335
+ :generic_output => "#888",
336
+ :generic_prompt => "bold #000080",
337
+ :generic_strong => "bold",
338
+ :generic_subheading => "bold #800080",
339
+ :generic_traceback => "#04D"
340
+ }
341
+ )
56
342
57
343
@doc """
58
- The *emacs* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#emacs).
344
+ The *default* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#default).
59
345
"""
60
- def emacs_style, do: HTML.EmacsStyle.style()
346
+ def default_style, do: @default_style
347
+
348
+ @dracula_style Style.make_style(
349
+ short_name: "dracula",
350
+ long_name: "Dracula Style",
351
+ background_color: "#282a36",
352
+ highlight_color: "#44475A",
353
+ styles: %{
354
+ :comment_single => "#44475A",
355
+ :keyword => "#FF92DF",
356
+ :keyword_declaration => "#FF92DF",
357
+ :keyword_namespace => "#FF92DF",
358
+ :name => "#50FA7B",
359
+ :name_attribute => "#BD93F9",
360
+ :name_builtin_pseudo => "#44475A",
361
+ :name_class => "#A4FFFF",
362
+ :name_constant => "#BD93F9",
363
+ :name_function => "#50FA7B",
364
+ :operator => "#FF92DF",
365
+ :punctuation => "#F8F8F2",
366
+ :string => "#F1FA8C",
367
+ :string_symbol => "#FFB86C",
368
+ }
369
+ )
61
370
62
371
@doc """
63
- The *friendly* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#friendly).
372
+ The *dracula* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#dracula).
64
373
"""
65
- def friendly_style, do: HTML.FriendlyStyle.style()
374
+ def dracula_style, do: @dracula_style
375
+
376
+ @emacs_style Style.make_style(
377
+ short_name: "emacs",
378
+ long_name: "Emacs Style",
379
+ background_color: "#f8f8f8",
380
+ highlight_color: "#ffffcc",
381
+ styles: %{
382
+ :error => "border:#FF0000",
383
+ :keyword => "bold #AA22FF",
384
+ :keyword_pseudo => "nobold",
385
+ :keyword_type => "bold #00BB00",
386
+ :name_attribute => "#BB4444",
387
+ :name_builtin => "#AA22FF",
388
+ :name_class => "#0000FF",
389
+ :name_constant => "#880000",
390
+ :name_decorator => "#AA22FF",
391
+ :name_entity => "bold #999999",
392
+ :name_exception => "bold #D2413A",
393
+ :name_function => "#00A000",
394
+ :name_label => "#A0A000",
395
+ :name_namespace => "bold #0000FF",
396
+ :name_tag => "bold #008000",
397
+ :name_variable => "#B8860B",
398
+ :string => "#BB4444",
399
+ :string_doc => "italic",
400
+ :string_escape => "bold #BB6622",
401
+ :string_interpol => "bold #BB6688",
402
+ :string_other => "#008000",
403
+ :string_regex => "#BB6688",
404
+ :string_symbol => "#B8860B",
405
+ :number => "#666666",
406
+ :operator => "#666666",
407
+ :operator_word => "bold #AA22FF",
408
+ :comment => "italic #008800",
409
+ :comment_preproc => "noitalic",
410
+ :comment_special => "noitalic bold",
411
+ :generic_deleted => "#A00000",
412
+ :generic_emph => "italic",
413
+ :generic_error => "#FF0000",
414
+ :generic_heading => "bold #000080",
415
+ :generic_inserted => "#00A000",
416
+ :generic_output => "#888",
417
+ :generic_prompt => "bold #000080",
418
+ :generic_strong => "bold",
419
+ :generic_subheading => "bold #800080",
420
+ :generic_traceback => "#04D"
421
+ }
422
+ )
66
423
67
424
@doc """
68
- The *fruity* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#fruity).
425
+ The *emacs* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#emacs).
69
426
"""
70
- def fruity_style, do: HTML.FruityStyle.style()
427
+ def emacs_style, do: @emacs_style
428
+
429
+ @friendly_style Style.make_style(
430
+ short_name: "friendly",
431
+ long_name: "Friendly Style",
432
+ background_color: "#f0f0f0",
433
+ highlight_color: "#ffffcc",
434
+ styles: %{
435
+ :error => "border:#FF0000",
436
+ :keyword => "bold #007020",
437
+ :keyword_pseudo => "nobold",
438
+ :keyword_type => "nobold #902000",
439
+ :name_attribute => "#4070a0",
440
+ :name_builtin => "#007020",
441
+ :name_class => "bold #0e84b5",
442
+ :name_constant => "#60add5",
443
+ :name_decorator => "bold #555555",
444
+ :name_entity => "bold #d55537",
445
+ :name_exception => "#007020",
446
+ :name_function => "#06287e",
447
+ :name_label => "bold #002070",
448
+ :name_namespace => "bold #0e84b5",
449
+ :name_tag => "bold #062873",
450
+ :name_variable => "#bb60d5",
451
+ :string => "#4070a0",
452
+ :string_doc => "italic",
453
+ :string_escape => "bold #4070a0",
454
+ :string_interpol => "italic #70a0d0",
455
+ :string_other => "#c65d09",
456
+ :string_regex => "#235388",
457
+ :string_symbol => "#517918",
458
+ :number => "#40a070",
459
+ :operator => "#666666",
460
+ :operator_word => "bold #007020",
461
+ :comment => "italic #60a0b0",
462
+ :comment_preproc => "noitalic #007020",
463
+ :comment_special => "noitalic bg:#fff0f0",
464
+ :generic_deleted => "#A00000",
465
+ :generic_emph => "italic",
466
+ :generic_error => "#FF0000",
467
+ :generic_heading => "bold #000080",
468
+ :generic_inserted => "#00A000",
469
+ :generic_output => "#888",
470
+ :generic_prompt => "bold #c65d09",
471
+ :generic_strong => "bold",
472
+ :generic_subheading => "bold #800080",
473
+ :generic_traceback => "#04D"
474
+ }
475
+ )
71
476
72
477
@doc """
73
- The *igor* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#igor).
478
+ The *friendly* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#friendly).
74
479
"""
75
- def igor_style, do: HTML.IgorStyle.style()
480
+ def friendly_style, do: @friendly_style
481
+
482
+ @fruity_style Style.make_style(
483
+ short_name: "fruity",
484
+ long_name: "Fruity Style",
485
+ background_color: "#111111",
486
+ highlight_color: "#333333",
487
+ styles: %{
488
+ :keyword => "#fb660a bold",
489
+ :keyword_pseudo => "nobold",
490
+ :keyword_type => "#cdcaa9 bold",
491
+ :name_attribute => "#ff0086 bold",
492
+ :name_constant => "#0086d2",
493
+ :name_function => "#ff0086 bold",
494
+ :name_tag => "#fb660a bold",
495
+ :name_variable => "#fb660a",
496
+ :string => "#0086d2",
497
+ :number => "#0086f7 bold",
498
+ :comment => "#008800 bg:#0f140f italic",
499
+ :comment_preproc => "#ff0007 bold",
500
+ :generic_heading => "#ffffff bold",
501
+ :generic_output => "#444444 bg:#222222",
502
+ :generic_subheading => "#ffffff bold"
503
+ }
504
+ )
76
505
77
506
@doc """
78
- The *lovelace* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#lovelace).
507
+ The *fruity* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#fruity).
79
508
"""
80
- def lovelace_style, do: HTML.LovelaceStyle.style()
509
+ def fruity_style, do: @fruity_style
510
+
511
+ @igor_style Style.make_style(
512
+ short_name: "igor",
513
+ long_name: "Igor Style",
514
+ background_color: "#ffffff",
515
+ highlight_color: "#ffffcc",
516
+ styles: %{
517
+ :keyword => "#0000FF",
518
+ :name_class => "#007575",
519
+ :name_decorator => "#CC00A3",
520
+ :name_function => "#C34E00",
521
+ :string => "#009C00",
522
+ :comment => "italic #FF0000"
523
+ }
524
+ )
81
525
82
526
@doc """
83
- The *manni* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#manni).
527
+ The *igor* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#igor).
84
528
"""
85
- def manni_style, do: HTML.ManniStyle.style()
529
+ def igor_style, do: @igor_style
530
+
531
+ @lovelace_style Style.make_style(
532
+ short_name: "lovelace",
533
+ long_name: "Lovelace Style",
534
+ background_color: "#ffffff",
535
+ highlight_color: "#ffffcc",
536
+ styles: %{
537
+ :error => "bg:#a848a8",
538
+ :keyword => "#2838b0",
539
+ :keyword_constant => "italic #444444",
540
+ :keyword_declaration => "italic",
541
+ :keyword_type => "italic",
542
+ :name_attribute => "#388038",
543
+ :name_builtin => "#388038",
544
+ :name_builtin_pseudo => "italic",
545
+ :name_class => "#287088",
546
+ :name_constant => "#b85820",
547
+ :name_decorator => "#287088",
548
+ :name_entity => "#709030",
549
+ :name_exception => "#908828",
550
+ :name_function => "#785840",
551
+ :name_function_magic => "#b85820",
552
+ :name_label => "#289870",
553
+ :name_namespace => "#289870",
554
+ :name_tag => "#2838b0",
555
+ :name_variable => "#b04040",
556
+ :name_variable_global => "#908828",
557
+ :name_variable_magic => "#b85820",
558
+ :string => "#b83838",
559
+ :string_affix => "#444444",
560
+ :string_char => "#a848a8",
561
+ :string_delimiter => "#b85820",
562
+ :string_doc => "italic #b85820",
563
+ :string_escape => "#709030",
564
+ :string_interpol => "underline",
565
+ :string_other => "#a848a8",
566
+ :string_regex => "#a848a8",
567
+ :number => "#444444",
568
+ :operator => "#666666",
569
+ :operator_word => "#a848a8",
570
+ :punctuation => "#888888",
571
+ :comment => "italic #888888",
572
+ :comment_hashbang => "#287088",
573
+ :comment_multiline => "#888888",
574
+ :comment_preproc => "noitalic #289870",
575
+ :generic_deleted => "#c02828",
576
+ :generic_emph => "italic",
577
+ :generic_error => "#c02828",
578
+ :generic_heading => "#666666",
579
+ :generic_inserted => "#388038",
580
+ :generic_output => "#666666",
581
+ :generic_prompt => "#444444",
582
+ :generic_strong => "bold",
583
+ :generic_subheading => "#444444",
584
+ :generic_traceback => "#2838b0"
585
+ }
586
+ )
86
587
87
588
@doc """
88
- The *monokai* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#monokai).
589
+ The *lovelace* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#lovelace).
89
590
"""
90
- def monokai_style, do: HTML.MonokaiStyle.style()
591
+ def lovelace_style, do: @lovelace_style
592
+
593
+ @manni_style Style.make_style(
594
+ short_name: "manni",
595
+ long_name: "Manni Style",
596
+ background_color: "#f0f3f3",
597
+ highlight_color: "#ffffcc",
598
+ styles: %{
599
+ :error => "bg:#FFAAAA #AA0000",
600
+ :keyword => "bold #006699",
601
+ :keyword_pseudo => "nobold",
602
+ :keyword_type => "#007788",
603
+ :name_attribute => "#330099",
604
+ :name_builtin => "#336666",
605
+ :name_class => "bold #00AA88",
606
+ :name_constant => "#336600",
607
+ :name_decorator => "#9999FF",
608
+ :name_entity => "bold #999999",
609
+ :name_exception => "bold #CC0000",
610
+ :name_function => "#CC00FF",
611
+ :name_label => "#9999FF",
612
+ :name_namespace => "bold #00CCFF",
613
+ :name_tag => "bold #330099",
614
+ :name_variable => "#003333",
615
+ :string => "#CC3300",
616
+ :string_doc => "italic",
617
+ :string_escape => "bold #CC3300",
618
+ :string_interpol => "#AA0000",
619
+ :string_other => "#CC3300",
620
+ :string_regex => "#33AAAA",
621
+ :string_symbol => "#FFCC33",
622
+ :number => "#FF6600",
623
+ :operator => "#555555",
624
+ :operator_word => "bold #000000",
625
+ :comment => "italic #0099FF",
626
+ :comment_preproc => "noitalic #009999",
627
+ :comment_special => "bold",
628
+ :generic_deleted => "border:#CC0000 bg:#FFCCCC",
629
+ :generic_emph => "italic",
630
+ :generic_error => "#FF0000",
631
+ :generic_heading => "bold #003300",
632
+ :generic_inserted => "border:#00CC00 bg:#CCFFCC",
633
+ :generic_output => "#AAAAAA",
634
+ :generic_prompt => "bold #000099",
635
+ :generic_strong => "bold",
636
+ :generic_subheading => "bold #003300",
637
+ :generic_traceback => "#99CC66"
638
+ }
639
+ )
91
640
92
641
@doc """
93
- The *murphy* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#murphy).
642
+ The *manni* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#manni).
94
643
"""
95
- def murphy_style, do: HTML.MurphyStyle.style()
644
+ def manni_style, do: @manni_style
645
+
646
+ @monokai_style Style.make_style(
647
+ short_name: "monokai",
648
+ long_name: "Monokai Style",
649
+ background_color: "#272822",
650
+ highlight_color: "#49483e",
651
+ styles: %{
652
+ :text => "#f8f8f2",
653
+ :error => "#960050 bg:#1e0010",
654
+ :keyword => "#66d9ef",
655
+ :keyword_namespace => "#f92672",
656
+ :name => "#f8f8f2",
657
+ :name_attribute => "#a6e22e",
658
+ :name_class => "#a6e22e",
659
+ :name_constant => "#66d9ef",
660
+ :name_decorator => "#a6e22e",
661
+ :name_exception => "#a6e22e",
662
+ :name_function => "#a6e22e",
663
+ :name_other => "#a6e22e",
664
+ :name_tag => "#f92672",
665
+ :literal => "#ae81ff",
666
+ :string => "#e6db74",
667
+ :string_escape => "#ae81ff",
668
+ :number => "#ae81ff",
669
+ :operator => "#f92672",
670
+ :punctuation => "#f8f8f2",
671
+ :comment => "#75715e",
672
+ :generic_deleted => "#f92672",
673
+ :generic_emph => "italic",
674
+ :generic_inserted => "#a6e22e",
675
+ :generic_strong => "bold",
676
+ :generic_subheading => "#75715e"
677
+ }
678
+ )
96
679
97
680
@doc """
98
- The *native* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#native).
681
+ The *monokai* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#monokai).
99
682
"""
100
- def native_style, do: HTML.NativeStyle.style()
683
+ def monokai_style, do: @monokai_style
684
+
685
+ @murphy_style Style.make_style(
686
+ short_name: "murphy",
687
+ long_name: "Murphy Style",
688
+ background_color: "#ffffff",
689
+ highlight_color: "#ffffcc",
690
+ styles: %{
691
+ :error => "#F00 bg:#FAA",
692
+ :keyword => "bold #289",
693
+ :keyword_pseudo => "#08f",
694
+ :keyword_type => "#66f",
695
+ :name_attribute => "#007",
696
+ :name_builtin => "#072",
697
+ :name_class => "bold #e9e",
698
+ :name_constant => "bold #5ed",
699
+ :name_decorator => "bold #555",
700
+ :name_entity => "#800",
701
+ :name_exception => "bold #F00",
702
+ :name_function => "bold #5ed",
703
+ :name_label => "bold #970",
704
+ :name_namespace => "bold #0e84b5",
705
+ :name_tag => "#070",
706
+ :name_variable => "#036",
707
+ :name_variable_class => "#ccf",
708
+ :name_variable_global => "#f84",
709
+ :name_variable_instance => "#aaf",
710
+ :string => "bg:#e0e0ff",
711
+ :string_char => "#88F bg:",
712
+ :string_doc => "#D42 bg:",
713
+ :string_escape => "bold #666",
714
+ :string_interpol => "bg:#eee",
715
+ :string_other => "#f88",
716
+ :string_regex => "bg:#e0e0ff #000",
717
+ :string_symbol => "#fc8 bg:",
718
+ :number => "bold #60E",
719
+ :number_float => "bold #60E",
720
+ :number_hex => "bold #058",
721
+ :number_integer => "bold #66f",
722
+ :number_oct => "bold #40E",
723
+ :operator => "#333",
724
+ :operator_word => "bold #000",
725
+ :comment => "#666 italic",
726
+ :comment_preproc => "#579 noitalic",
727
+ :comment_special => "#c00 bold",
728
+ :generic_deleted => "#A00000",
729
+ :generic_emph => "italic",
730
+ :generic_error => "#FF0000",
731
+ :generic_heading => "bold #000080",
732
+ :generic_inserted => "#00A000",
733
+ :generic_output => "#888",
734
+ :generic_prompt => "bold #c65d09",
735
+ :generic_strong => "bold",
736
+ :generic_subheading => "bold #800080",
737
+ :generic_traceback => "#04D"
738
+ }
739
+ )
101
740
102
741
@doc """
103
- The *paraiso_dark* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#paraiso_dark).
742
+ The *murphy* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#murphy).
104
743
"""
105
- def paraiso_dark_style, do: HTML.ParaisoDarkStyle.style()
744
+ def murphy_style, do: @murphy_style
745
+
746
+ @native_style Style.make_style(
747
+ short_name: "native",
748
+ long_name: "Native Style",
749
+ background_color: "#202020",
750
+ highlight_color: "#404040",
751
+ styles: %{
752
+ :error => "bg:#e3d2d2 #a61717",
753
+ :keyword => "bold #6ab825",
754
+ :keyword_pseudo => "nobold",
755
+ :name_attribute => "#bbbbbb",
756
+ :name_builtin => "#24909d",
757
+ :name_class => "underline #447fcf",
758
+ :name_constant => "#40ffff",
759
+ :name_decorator => "#ffa500",
760
+ :name_exception => "#bbbbbb",
761
+ :name_function => "#447fcf",
762
+ :name_namespace => "underline #447fcf",
763
+ :name_tag => "bold #6ab825",
764
+ :name_variable => "#40ffff",
765
+ :string => "#ed9d13",
766
+ :string_other => "#ffa500",
767
+ :number => "#3677a9",
768
+ :operator_word => "bold #6ab825",
769
+ :comment => "italic #999999",
770
+ :comment_preproc => "noitalic bold #cd2828",
771
+ :comment_special => "noitalic bold #e50808 bg:#520000",
772
+ :generic_deleted => "#d22323",
773
+ :generic_emph => "italic",
774
+ :generic_error => "#d22323",
775
+ :generic_heading => "bold #ffffff",
776
+ :generic_inserted => "#589819",
777
+ :generic_output => "#cccccc",
778
+ :generic_prompt => "#aaaaaa",
779
+ :generic_strong => "bold",
780
+ :generic_subheading => "underline #ffffff",
781
+ :generic_traceback => "#d22323"
782
+ }
783
+ )
106
784
107
785
@doc """
108
- The *paraiso_light* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#paraiso_light).
786
+ The *native* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#native).
109
787
"""
110
- def paraiso_light_style, do: HTML.ParaisoLightStyle.style()
788
+ def native_style, do: @native_style
789
+
790
+ @one_dark_style Style.make_style(
791
+ short_name: "one_dark",
792
+ long_name: "One Dark Style",
793
+ background_color: "#282c34",
794
+ highlight_color: "#31353f",
795
+ styles: %{
796
+ :punctuation => "#ABB2BF",
797
+ :keyword => "#C678DD",
798
+ :keyword_constant => "#E5C07B",
799
+ :keyword_declaration => "#C678DD",
800
+ :keyword_namespace => "#C678DD",
801
+ :keyword_reserved => "#C678DD",
802
+ :keyword_type => "#E5C07B",
803
+ :name => "#C4CAD6",
804
+ :name_attribute => "#E06C75",
805
+ :name_builtin => "#E5C07B",
806
+ :name_class => "#E06C75",
807
+ :name_constant => "#61AFEF",
808
+ :name_function => "bold #61AFEF",
809
+ :name_function_magic => "bold #56B6C2",
810
+ :name_other => "#E06C75",
811
+ :name_tag => "#E06C75",
812
+ :name_decorator => "#61AFEF",
813
+ :string => "#98C379",
814
+ :string_symbol => "#61AFEF",
815
+ :number => "#D19A66",
816
+ :operator => "#56B6C2",
817
+ :comment => "#8C92A3"
818
+ }
819
+ )
111
820
112
821
@doc """
113
- The *pastie* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#pastie).
822
+ The *one_dark* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#one_dark).
114
823
"""
115
- def pastie_style, do: HTML.PastieStyle.style()
824
+ def one_dark_style, do: @one_dark_style
825
+
826
+ @paraiso_dark_style Style.make_style(
827
+ short_name: "paraiso_dark",
828
+ long_name: "ParaisoDark Style",
829
+ background_color: "#2f1e2e",
830
+ highlight_color: "#4f424c",
831
+ styles: %{
832
+ :text => "#e7e9db",
833
+ :error => "#ef6155",
834
+ :keyword => "#815ba4",
835
+ :keyword_namespace => "#5bc4bf",
836
+ :keyword_type => "#fec418",
837
+ :name => "#e7e9db",
838
+ :name_attribute => "#06b6ef",
839
+ :name_class => "#fec418",
840
+ :name_constant => "#ef6155",
841
+ :name_decorator => "#5bc4bf",
842
+ :name_exception => "#ef6155",
843
+ :name_function => "#06b6ef",
844
+ :name_namespace => "#fec418",
845
+ :name_other => "#06b6ef",
846
+ :name_tag => "#5bc4bf",
847
+ :name_variable => "#ef6155",
848
+ :literal => "#f99b15",
849
+ :string => "#48b685",
850
+ :string_char => "#e7e9db",
851
+ :string_doc => "#776e71",
852
+ :string_escape => "#f99b15",
853
+ :string_interpol => "#f99b15",
854
+ :number => "#f99b15",
855
+ :operator => "#5bc4bf",
856
+ :punctuation => "#e7e9db",
857
+ :comment => "#776e71",
858
+ :generic_deleted => "#ef6155",
859
+ :generic_emph => "italic",
860
+ :generic_heading => "bold #e7e9db",
861
+ :generic_inserted => "#48b685",
862
+ :generic_prompt => "bold #776e71",
863
+ :generic_strong => "bold",
864
+ :generic_subheading => "bold #5bc4bf"
865
+ }
866
+ )
116
867
117
868
@doc """
118
- The *perldoc* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#perldoc).
869
+ The *paraiso_dark* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#paraiso_dark).
119
870
"""
120
- def perldoc_style, do: HTML.PerldocStyle.style()
871
+ def paraiso_dark_style, do: @paraiso_dark_style
872
+
873
+ @paraiso_light_style Style.make_style(
874
+ short_name: "paraiso_light",
875
+ long_name: "ParaisoLight Style",
876
+ background_color: "#e7e9db",
877
+ highlight_color: "#a39e9b",
878
+ styles: %{
879
+ :text => "#2f1e2e",
880
+ :error => "#ef6155",
881
+ :keyword => "#815ba4",
882
+ :keyword_namespace => "#5bc4bf",
883
+ :keyword_type => "#fec418",
884
+ :name => "#2f1e2e",
885
+ :name_attribute => "#06b6ef",
886
+ :name_class => "#fec418",
887
+ :name_constant => "#ef6155",
888
+ :name_decorator => "#5bc4bf",
889
+ :name_exception => "#ef6155",
890
+ :name_function => "#06b6ef",
891
+ :name_namespace => "#fec418",
892
+ :name_other => "#06b6ef",
893
+ :name_tag => "#5bc4bf",
894
+ :name_variable => "#ef6155",
895
+ :literal => "#f99b15",
896
+ :string => "#48b685",
897
+ :string_char => "#2f1e2e",
898
+ :string_doc => "#8d8687",
899
+ :string_escape => "#f99b15",
900
+ :string_interpol => "#f99b15",
901
+ :number => "#f99b15",
902
+ :operator => "#5bc4bf",
903
+ :punctuation => "#2f1e2e",
904
+ :comment => "#8d8687",
905
+ :generic_deleted => "#ef6155",
906
+ :generic_emph => "italic",
907
+ :generic_heading => "bold #2f1e2e",
908
+ :generic_inserted => "#48b685",
909
+ :generic_prompt => "bold #8d8687",
910
+ :generic_strong => "bold",
911
+ :generic_subheading => "bold #5bc4bf"
912
+ }
913
+ )
121
914
122
915
@doc """
123
- The *rainbow_dash* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#rainbow_dash).
916
+ The *paraiso_light* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#paraiso_light).
124
917
"""
125
- def rainbow_dash_style, do: HTML.RainbowDashStyle.style()
918
+ def paraiso_light_style, do: @paraiso_light_style
919
+
920
+ @pastie_style Style.make_style(
921
+ short_name: "pastie",
922
+ long_name: "Pastie Style",
923
+ background_color: "#ffffff",
924
+ highlight_color: "#ffffcc",
925
+ styles: %{
926
+ :error => "bg:#e3d2d2 #a61717",
927
+ :keyword => "bold #008800",
928
+ :keyword_pseudo => "nobold",
929
+ :keyword_type => "#888888",
930
+ :name_attribute => "#336699",
931
+ :name_builtin => "#003388",
932
+ :name_class => "bold #bb0066",
933
+ :name_constant => "bold #003366",
934
+ :name_decorator => "#555555",
935
+ :name_exception => "bold #bb0066",
936
+ :name_function => "bold #0066bb",
937
+ :name_property => "bold #336699",
938
+ :name_label => "italic #336699",
939
+ :name_namespace => "bold #bb0066",
940
+ :name_tag => "bold #bb0066",
941
+ :name_variable => "#336699",
942
+ :name_variable_class => "#336699",
943
+ :name_variable_global => "#dd7700",
944
+ :name_variable_instance => "#3333bb",
945
+ :string => "bg:#fff0f0 #dd2200",
946
+ :string_escape => "#0044dd",
947
+ :string_interpol => "#3333bb",
948
+ :string_other => "bg:#f0fff0 #22bb22",
949
+ :string_regex => "bg:#fff0ff #008800",
950
+ :string_symbol => "#aa6600",
951
+ :number => "bold #0000DD",
952
+ :operator_word => "#008800",
953
+ :comment => "#888888",
954
+ :comment_preproc => "bold #cc0000",
955
+ :comment_special => "bg:#fff0f0 bold #cc0000",
956
+ :generic_deleted => "bg:#ffdddd #000000",
957
+ :generic_emph => "italic",
958
+ :generic_error => "#aa0000",
959
+ :generic_heading => "#333",
960
+ :generic_inserted => "bg:#ddffdd #000000",
961
+ :generic_output => "#888888",
962
+ :generic_prompt => "#555555",
963
+ :generic_strong => "bold",
964
+ :generic_subheading => "#666",
965
+ :generic_traceback => "#aa0000"
966
+ }
967
+ )
126
968
127
969
@doc """
128
- The *rrt* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#rrt).
970
+ The *pastie* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#pastie).
129
971
"""
130
- def rrt_style, do: HTML.RrtStyle.style()
972
+ def pastie_style, do: @pastie_style
973
+
974
+ @perldoc_style Style.make_style(
975
+ short_name: "perldoc",
976
+ long_name: "Perldoc Style",
977
+ background_color: "#eeeedd",
978
+ highlight_color: "#ffffcc",
979
+ styles: %{
980
+ :error => "bg:#e3d2d2 #a61717",
981
+ :keyword => "#8B008B bold",
982
+ :keyword_type => "#00688B",
983
+ :name_attribute => "#658b00",
984
+ :name_builtin => "#658b00",
985
+ :name_class => "#008b45 bold",
986
+ :name_constant => "#00688B",
987
+ :name_decorator => "#707a7c",
988
+ :name_exception => "#008b45 bold",
989
+ :name_function => "#008b45",
990
+ :name_namespace => "#008b45 underline",
991
+ :name_tag => "#8B008B bold",
992
+ :name_variable => "#00688B",
993
+ :string => "#CD5555",
994
+ :string_heredoc => "#1c7e71 italic",
995
+ :string_other => "#cb6c20",
996
+ :string_regex => "#1c7e71",
997
+ :number => "#B452CD",
998
+ :operator_word => "#8B008B",
999
+ :comment => "#228B22",
1000
+ :comment_preproc => "#1e889b",
1001
+ :comment_special => "#8B008B bold",
1002
+ :generic_deleted => "#aa0000",
1003
+ :generic_emph => "italic",
1004
+ :generic_error => "#aa0000",
1005
+ :generic_heading => "bold #000080",
1006
+ :generic_inserted => "#00aa00",
1007
+ :generic_output => "#888888",
1008
+ :generic_prompt => "#555555",
1009
+ :generic_strong => "bold",
1010
+ :generic_subheading => "bold #800080",
1011
+ :generic_traceback => "#aa0000"
1012
+ }
1013
+ )
131
1014
132
1015
@doc """
133
- The *tango* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#tango).
1016
+ The *perldoc* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#perldoc).
134
1017
"""
135
- def tango_style, do: HTML.TangoStyle.style()
1018
+ def perldoc_style, do: @perldoc_style
1019
+
1020
+ @rainbow_dash_style Style.make_style(
1021
+ short_name: "rainbow_dash",
1022
+ long_name: "RainbowDash Style",
1023
+ background_color: "#ffffff",
1024
+ highlight_color: "#ffffcc",
1025
+ styles: %{
1026
+ :text => "#4d4d4d",
1027
+ :error => "bg:#cc0000 #ffffff",
1028
+ :keyword => "bold #2c5dcd",
1029
+ :keyword_pseudo => "nobold",
1030
+ :keyword_type => "#5918bb",
1031
+ :name_attribute => "italic #2c5dcd",
1032
+ :name_builtin => "bold #5918bb",
1033
+ :name_class => "underline",
1034
+ :name_constant => "#318495",
1035
+ :name_decorator => "bold #ff8000",
1036
+ :name_entity => "bold #5918bb",
1037
+ :name_exception => "bold #5918bb",
1038
+ :name_function => "bold #ff8000",
1039
+ :name_tag => "bold #2c5dcd",
1040
+ :string => "#00cc66",
1041
+ :string_doc => "italic",
1042
+ :string_escape => "bold #c5060b",
1043
+ :string_other => "#318495",
1044
+ :string_symbol => "bold #c5060b",
1045
+ :number => "bold #5918bb",
1046
+ :operator => "#2c5dcd",
1047
+ :operator_word => "bold",
1048
+ :comment => "italic #0080ff",
1049
+ :comment_preproc => "noitalic",
1050
+ :comment_special => "bold",
1051
+ :generic_deleted => "border:#c5060b bg:#ffcccc",
1052
+ :generic_emph => "italic",
1053
+ :generic_error => "#ff0000",
1054
+ :generic_heading => "bold #2c5dcd",
1055
+ :generic_inserted => "border:#00cc00 bg:#ccffcc",
1056
+ :generic_output => "#aaaaaa",
1057
+ :generic_prompt => "bold #2c5dcd",
1058
+ :generic_strong => "bold",
1059
+ :generic_subheading => "bold #2c5dcd",
1060
+ :generic_traceback => "#c5060b"
1061
+ }
1062
+ )
136
1063
137
1064
@doc """
138
- The *trac* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#trac).
1065
+ The *rainbow_dash* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#rainbow_dash).
139
1066
"""
140
- def trac_style, do: HTML.TracStyle.style()
1067
+ def rainbow_dash_style, do: @rainbow_dash_style
1068
+
1069
+ @rrt_style Style.make_style(
1070
+ short_name: "rrt",
1071
+ long_name: "Rrt Style",
1072
+ background_color: "#000000",
1073
+ highlight_color: "#0000ff",
1074
+ styles: %{
1075
+ :keyword => "#ff0000",
1076
+ :keyword_type => "#ee82ee",
1077
+ :name_constant => "#7fffd4",
1078
+ :name_function => "#ffff00",
1079
+ :name_variable => "#eedd82",
1080
+ :string => "#87ceeb",
1081
+ :comment => "#00ff00",
1082
+ :comment_preproc => "#e5e5e5"
1083
+ }
1084
+ )
141
1085
142
1086
@doc """
143
- The *vim* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#vim).
1087
+ The *rrt* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#rrt).
144
1088
"""
145
- def vim_style, do: HTML.VimStyle.style()
1089
+ def rrt_style, do: @rrt_style
1090
+
1091
+ @tango_style Style.make_style(
1092
+ short_name: "tango",
1093
+ long_name: "Tango Style",
1094
+ background_color: "#f8f8f8",
1095
+ highlight_color: "#ffffcc",
1096
+ styles: %{
1097
+ :error => "#a40000 border:#ef2929",
1098
+ :other => "#000000",
1099
+ :keyword => "bold #204a87",
1100
+ :keyword_constant => "bold #204a87",
1101
+ :keyword_declaration => "bold #204a87",
1102
+ :keyword_namespace => "bold #204a87",
1103
+ :keyword_pseudo => "bold #204a87",
1104
+ :keyword_reserved => "bold #204a87",
1105
+ :keyword_type => "bold #204a87",
1106
+ :name => "#000000",
1107
+ :name_attribute => "#c4a000",
1108
+ :name_builtin => "#204a87",
1109
+ :name_builtin_pseudo => "#3465a4",
1110
+ :name_class => "#000000",
1111
+ :name_constant => "#000000",
1112
+ :name_decorator => "bold #5c35cc",
1113
+ :name_entity => "#ce5c00",
1114
+ :name_exception => "bold #cc0000",
1115
+ :name_function => "#000000",
1116
+ :name_property => "#000000",
1117
+ :name_label => "#f57900",
1118
+ :name_namespace => "#000000",
1119
+ :name_other => "#000000",
1120
+ :name_tag => "bold #204a87",
1121
+ :name_variable => "#000000",
1122
+ :name_variable_class => "#000000",
1123
+ :name_variable_global => "#000000",
1124
+ :name_variable_instance => "#000000",
1125
+ :literal => "#000000",
1126
+ :string => "#4e9a06",
1127
+ :string_backtick => "#4e9a06",
1128
+ :string_char => "#4e9a06",
1129
+ :string_doc => "italic #8f5902",
1130
+ :string_double => "#4e9a06",
1131
+ :string_escape => "#4e9a06",
1132
+ :string_heredoc => "#4e9a06",
1133
+ :string_interpol => "#4e9a06",
1134
+ :string_other => "#4e9a06",
1135
+ :string_regex => "#4e9a06",
1136
+ :string_single => "#4e9a06",
1137
+ :string_symbol => "#4e9a06",
1138
+ :number => "bold #0000cf",
1139
+ :number_float => "bold #0000cf",
1140
+ :number_hex => "bold #0000cf",
1141
+ :number_integer => "bold #0000cf",
1142
+ :number_integer_long => "bold #0000cf",
1143
+ :number_oct => "bold #0000cf",
1144
+ :operator => "bold #ce5c00",
1145
+ :operator_word => "bold #204a87",
1146
+ :punctuation => "bold #000000",
1147
+ :comment => "italic #8f5902",
1148
+ :comment_multiline => "italic #8f5902",
1149
+ :comment_preproc => "italic #8f5902",
1150
+ :comment_single => "italic #8f5902",
1151
+ :comment_special => "italic #8f5902",
1152
+ :generic => "#000000",
1153
+ :generic_deleted => "#a40000",
1154
+ :generic_emph => "italic #000000",
1155
+ :generic_error => "#ef2929",
1156
+ :generic_heading => "bold #000080",
1157
+ :generic_inserted => "#00A000",
1158
+ :generic_output => "italic #000000",
1159
+ :generic_prompt => "#8f5902",
1160
+ :generic_strong => "bold #000000",
1161
+ :generic_subheading => "bold #800080",
1162
+ :generic_traceback => "bold #a40000"
1163
+ }
1164
+ )
146
1165
147
1166
@doc """
148
- The *vs* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#vs).
1167
+ The *tango* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#tango).
149
1168
"""
150
- def vs_style, do: HTML.VisualStudioStyle.style()
1169
+ def tango_style, do: @tango_style
1170
+
1171
+ @trac_style Style.make_style(
1172
+ short_name: "trac",
1173
+ long_name: "Trac Style",
1174
+ background_color: "#ffffff",
1175
+ highlight_color: "#ffffcc",
1176
+ styles: %{
1177
+ :error => "bg:#e3d2d2 #a61717",
1178
+ :keyword => "bold",
1179
+ :keyword_type => "#445588",
1180
+ :name_attribute => "#008080",
1181
+ :name_builtin => "#999999",
1182
+ :name_class => "bold #445588",
1183
+ :name_constant => "#008080",
1184
+ :name_entity => "#800080",
1185
+ :name_exception => "bold #990000",
1186
+ :name_function => "bold #990000",
1187
+ :name_namespace => "#555555",
1188
+ :name_tag => "#000080",
1189
+ :name_variable => "#008080",
1190
+ :string => "#bb8844",
1191
+ :string_regex => "#808000",
1192
+ :number => "#009999",
1193
+ :operator => "bold",
1194
+ :comment => "italic #999988",
1195
+ :comment_preproc => "bold noitalic #999999",
1196
+ :comment_special => "bold #999999",
1197
+ :generic_deleted => "bg:#ffdddd #000000",
1198
+ :generic_emph => "italic",
1199
+ :generic_error => "#aa0000",
1200
+ :generic_heading => "#999999",
1201
+ :generic_inserted => "bg:#ddffdd #000000",
1202
+ :generic_output => "#888888",
1203
+ :generic_prompt => "#555555",
1204
+ :generic_strong => "bold",
1205
+ :generic_subheading => "#aaaaaa",
1206
+ :generic_traceback => "#aa0000"
1207
+ }
1208
+ )
151
1209
152
1210
@doc """
153
- The *xcode* style. Example [here](https://tmbb.github.io/makeup_demo/elixir.html#xcode).
1211
+ The *trac* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#trac).
154
1212
"""
155
- def xcode_style, do: HTML.XcodeStyle.style()
1213
+ def trac_style, do: @trac_style
1214
+
1215
+ @vim_style Style.make_style(
1216
+ short_name: "vim",
1217
+ long_name: "Vim Style",
1218
+ background_color: "#000000",
1219
+ highlight_color: "#222222",
1220
+ styles: %{
1221
+ :error => "border:#FF0000",
1222
+ :keyword => "#cdcd00",
1223
+ :keyword_declaration => "#00cd00",
1224
+ :keyword_namespace => "#cd00cd",
1225
+ :keyword_type => "#00cd00",
1226
+ :name_builtin => "#cd00cd",
1227
+ :name_class => "#00cdcd",
1228
+ :name_exception => "bold #666699",
1229
+ :name_variable => "#00cdcd",
1230
+ :string => "#cd0000",
1231
+ :number => "#cd00cd",
1232
+ :operator => "#3399cc",
1233
+ :operator_word => "#cdcd00",
1234
+ :comment => "#000080",
1235
+ :comment_special => "bold #cd0000",
1236
+ :generic_deleted => "#cd0000",
1237
+ :generic_emph => "italic",
1238
+ :generic_error => "#FF0000",
1239
+ :generic_heading => "bold #000080",
1240
+ :generic_inserted => "#00cd00",
1241
+ :generic_output => "#888",
1242
+ :generic_prompt => "bold #000080",
1243
+ :generic_strong => "bold",
1244
+ :generic_subheading => "bold #800080",
1245
+ :generic_traceback => "#04D"
1246
+ }
1247
+ )
1248
+
1249
+ @doc """
1250
+ The *vim* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#vim).
1251
+ """
1252
+ def vim_style, do: @vim_style
1253
+
1254
+ @vs_style Style.make_style(
1255
+ short_name: "vs",
1256
+ long_name: "VisualStudio Style",
1257
+ background_color: "#ffffff",
1258
+ highlight_color: "#ffffcc",
1259
+ styles: %{
1260
+ :error => "border:#FF0000",
1261
+ :keyword => "#0000ff",
1262
+ :keyword_type => "#2b91af",
1263
+ :name_class => "#2b91af",
1264
+ :string => "#a31515",
1265
+ :operator_word => "#0000ff",
1266
+ :comment => "#008000",
1267
+ :comment_preproc => "#0000ff",
1268
+ :generic_emph => "italic",
1269
+ :generic_heading => "bold",
1270
+ :generic_prompt => "bold",
1271
+ :generic_strong => "bold",
1272
+ :generic_subheading => "bold"
1273
+ }
1274
+ )
1275
+
1276
+ @doc """
1277
+ The *vs* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#vs).
1278
+ """
1279
+ def vs_style, do: @vs_style
1280
+
1281
+ @xcode_style Style.make_style(
1282
+ short_name: "xcode",
1283
+ long_name: "Xcode Style",
1284
+ background_color: "#ffffff",
1285
+ highlight_color: "#ffffcc",
1286
+ styles: %{
1287
+ :error => "#000000",
1288
+ :keyword => "#A90D91",
1289
+ :name => "#000000",
1290
+ :name_attribute => "#836C28",
1291
+ :name_builtin => "#A90D91",
1292
+ :name_builtin_pseudo => "#5B269A",
1293
+ :name_class => "#3F6E75",
1294
+ :name_decorator => "#000000",
1295
+ :name_function => "#000000",
1296
+ :name_label => "#000000",
1297
+ :name_tag => "#000000",
1298
+ :name_variable => "#000000",
1299
+ :literal => "#1C01CE",
1300
+ :string => "#C41A16",
1301
+ :string_char => "#2300CE",
1302
+ :number => "#1C01CE",
1303
+ :operator => "#000000",
1304
+ :comment => "#177500",
1305
+ :comment_preproc => "#633820"
1306
+ }
1307
+ )
1308
+
1309
+ @doc """
1310
+ The *xcode* style. Example [here](https://elixir-makeup.github.io/makeup_demo/elixir.html#xcode).
1311
+ """
1312
+ def xcode_style, do: @xcode_style
156
1313
157
1314
# %% End Pygments %%
158
1315
159
- # Custom themes:
1316
+ @samba_style Style.make_style(
1317
+ short_name: "samba",
1318
+ long_name: "Samba Style",
1319
+ background_color: "#f8f8f8",
1320
+ highlight_color: "#ffffcc",
1321
+ styles: %{
1322
+ :error => "#a40000 border:#ef2929",
1323
+ :other => "#000000",
1324
+ :keyword => "bold #204a87",
1325
+ :keyword_constant => "bold #204a87",
1326
+ :keyword_declaration => "bold #204a87",
1327
+ :keyword_namespace => "bold #204a87",
1328
+ :keyword_pseudo => "bold #204a87",
1329
+ :keyword_reserved => "bold #204a87",
1330
+ :keyword_type => "bold #204a87",
1331
+ :name => "#000000",
1332
+ :name_attribute => "#c4a000",
1333
+ :name_builtin => "#204a87",
1334
+ :name_builtin_pseudo => "#3465a4",
1335
+ :name_class => "#5c35cc",
1336
+ :name_constant => "#000000",
1337
+ :name_decorator => "bold #5c35cc",
1338
+ :name_entity => "#ce5c00",
1339
+ :name_exception => "bold #cc0000",
1340
+ :name_function => "#000000",
1341
+ :name_property => "#000000",
1342
+ :name_label => "#f57900",
1343
+ :name_namespace => "#000000",
1344
+ :name_other => "#000000",
1345
+ :name_tag => "bold #204a87",
1346
+ :name_variable => "#000000",
1347
+ :name_variable_class => "#000000",
1348
+ :name_variable_global => "#000000",
1349
+ :name_variable_instance => "#000000",
1350
+ :literal => "#000000",
1351
+ :string => "#4e9a06",
1352
+ :string_backtick => "#4e9a06",
1353
+ :string_char => "#4e9a06",
1354
+ :string_doc => "italic #8f5902",
1355
+ :string_double => "#4e9a06",
1356
+ :string_escape => "#4e9a06",
1357
+ :string_heredoc => "#4e9a06",
1358
+ :string_interpol => "#4e9a06",
1359
+ :string_other => "#4e9a06",
1360
+ :string_regex => "#4e9a06",
1361
+ :string_single => "#4e9a06",
1362
+ :string_symbol => "#4e9a06",
1363
+ :number => "bold #0000cf",
1364
+ :number_float => "bold #0000cf",
1365
+ :number_hex => "bold #0000cf",
1366
+ :number_integer => "bold #0000cf",
1367
+ :number_integer_long => "bold #0000cf",
1368
+ :number_oct => "bold #0000cf",
1369
+ :operator => "bold #ce5c00",
1370
+ :operator_word => "bold #204a87",
1371
+ :punctuation => "#000000",
1372
+ :comment => "#8e908c",
1373
+ :comment_multiline => "#8e908c",
1374
+ :comment_preproc => "#8e908c",
1375
+ :comment_single => "#8e908c",
1376
+ :comment_special => "#8e908c",
1377
+ :generic => "#000000",
1378
+ :generic_deleted => "#a40000",
1379
+ :generic_emph => "italic #000000",
1380
+ :generic_error => "#ef2929",
1381
+ :generic_heading => "bold #000080",
1382
+ :generic_inserted => "#00A000",
1383
+ :generic_output => "italic #000000",
1384
+ :generic_prompt => "#8f5902",
1385
+ :generic_strong => "bold #000000",
1386
+ :generic_subheading => "bold #800080",
1387
+ :generic_traceback => "bold #a40000"
1388
+ }
1389
+ )
1390
+
160
1391
@doc """
161
1392
The *samba* style, based on the tango style, but with visual distinction between
162
1393
classes and variables, and lighter punctuation.
163
1394
"""
164
- def samba_style, do: HTML.SambaStyle.style()
1395
+ def samba_style, do: @samba_style
165
1396
end
added lib/makeup/styles/html/token_style.ex
 
@@ -0,0 +1,78 @@
1
+ defmodule Makeup.Styles.HTML.TokenStyle do
2
+ @moduledoc false
3
+
4
+ defstruct font_style: nil,
5
+ font_weight: nil,
6
+ border: nil,
7
+ text_decoration: nil,
8
+ color: nil,
9
+ background_color: nil,
10
+ literal: nil
11
+
12
+ @doc """
13
+ A `TokenStyle` is considered empty if all its fields are `nil`.
14
+
15
+ A CSS class for an empty `TokenStyle` is not rendered in the stylesheet.
16
+ This saves a little space and makes the stylesheet more human-readable.
17
+ """
18
+ def empty?(style) do
19
+ not not_empty?(style)
20
+ end
21
+
22
+ @doc """
23
+ A `TokenStyle` is empty if at least a field is not `nil`.
24
+
25
+ A CSS class for an empty `TokenStyle` is rendered in the stylesheet.
26
+ """
27
+ def not_empty?(style) do
28
+ style |> Map.from_struct() |> Map.values() |> Enum.any?()
29
+ end
30
+
31
+ # Foreground color
32
+ defp to_attr("#" <> _ = color), do: {:color, color}
33
+ # Background color
34
+ defp to_attr("bg:" <> color), do: {:background_color, color}
35
+ # Border (can only specify border color)
36
+ defp to_attr("border:" <> color), do: {:border, color}
37
+ # Font weight (bold vs normal)
38
+ defp to_attr("bold"), do: {:font_weight, "bold"}
39
+ defp to_attr("nobold"), do: {:font_weight, "normal"}
40
+ # Font style (italic vs oblique vs normal)
41
+ defp to_attr("italic"), do: {:font_style, "italic"}
42
+ defp to_attr("oblique"), do: {:font_style, "oblique"}
43
+ defp to_attr("noitalic"), do: {:font_style, "normal"}
44
+ # Text decoration (underline vs none)
45
+ defp to_attr("underline"), do: {:text_decoration, "underline"}
46
+ # Unrecognized commands:
47
+ defp to_attr(other) do
48
+ # Log the command
49
+ IO.warn("unknown attribute #{inspect(other)}")
50
+ false
51
+ end
52
+
53
+ @doc """
54
+ Creates a `TokenStyle` from string description.
55
+
56
+ The string description is highly optimized for the goal of being typed by a human.
57
+ The following commands are recognized:
58
+
59
+ * `~r/#[0-9a-f]+/` for foreround color
60
+ * `~r/bg:#[0-9a-f]+/` for background color
61
+ * `~r/border:#[0-9a-f]+/` for border color
62
+ * `italic` for `font-style: italic`
63
+ * `oblique` for `font-style: oblique`
64
+ * `noitalic` for `font-style: normal`
65
+ * `underline` for `font-style: underline`
66
+
67
+ No other commands are currently recognized.
68
+ """
69
+ def from_string(str) do
70
+ attrs =
71
+ str
72
+ |> String.split()
73
+ |> Enum.map(&to_attr/1)
74
+ |> Enum.filter(fn x -> x end)
75
+
76
+ struct(__MODULE__, attrs)
77
+ end
78
+ end
changed mix.exs
 
@@ -1,7 +1,7 @@
1
1
defmodule Makeup.Mixfile do
2
2
use Mix.Project
3
3
4
- @version "1.1.0"
4
+ @version "1.1.1"
5
5
@url "https://github.com/elixir-makeup/makeup"
6
6
7
7
def project do
 
@@ -38,7 +38,7 @@ defmodule Makeup.Mixfile do
38
38
defp package do
39
39
[
40
40
name: :makeup,
41
- licenses: ["BSD"],
41
+ licenses: ["BSD-2-Clause"],
42
42
maintainers: ["Tiago Barroso <[email protected]>"],
43
43
links: %{
44
44
"Changelog" => "https://hexdocs.pm/makeup/changelog.html",