mdx 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/mdx +2 -392
  3. data/lib/mdx.rb +398 -0
  4. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29c61ce0d62facb0cdc4df02da59000db7bd5037
4
- data.tar.gz: c0404c68e87c853465921e59da73057805a52dd3
3
+ metadata.gz: dcd56bd949faf4f9e1484822e30d6e7762df8a31
4
+ data.tar.gz: 528cbf4c919ce09ad3f58df46ebaa5998fa07d37
5
5
  SHA512:
6
- metadata.gz: 38e52277d98ee4767e3c7ec7b7523267574fd647f68073ed86c3be28d2c4b8f0d57975632e1387af49a00ceb7ea4c645527c73b9de42fe6d1218c31f408f8474
7
- data.tar.gz: f7ae1a4dc56e388663308da84e350b10d9d5369bc7b06265182010e65a2c371884dbd9511dd0dfde39e71ffa07df8db58b8c6930e8085be97c4f98b6459e8074
6
+ metadata.gz: f3ce1165576db82039522c6da727b5158fd9d5f74e592645b402a6b645c503e480f6723fae7626fde69bf7b3e09f8fb1240ab5b83dc4839331b2f68f5f5cbf0e
7
+ data.tar.gz: 8d116dcad52c378069f87f549b79b3ee8f61a73458678de9bcfb2e9f61c296ef00f55ad3ef7972021293ca2ffba6864928a38fa10406a0a1764e2af69a417c3c
data/bin/mdx CHANGED
@@ -1,397 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
- require 'rubygems'
4
- require 'redcarpet'
5
- require 'rouge'
6
- require 'rouge/plugins/redcarpet'
7
- require 'sass'
8
-
9
- class Title < Redcarpet::Render::XHTML
10
- include Rouge::Plugins::Redcarpet
11
-
12
- attr_reader :title
13
-
14
- def initialize
15
- @level = 8
16
- super
17
- end
18
-
19
- def header title, level
20
- if level < @level || !@title
21
- @title = title
22
- @level = level
23
- end
24
- "<h#{level}>#{title}</h#{level}>"
25
- end
26
-
27
- def self.load_templates
28
- @@templates = {}
29
-
30
- begin
31
- io = File.read(__FILE__).force_encoding(Encoding::UTF_8)
32
- app, data = io.gsub("\r\n", "\n").split(/^__END__$/, 2)
33
- rescue Errno::ENOENT
34
- app, data = nil
35
- end
36
-
37
- if data
38
- template = nil
39
- data.each_line do |line|
40
- if line =~ /^@@\s*(.*\S)\s*$/
41
- template = ''
42
- @@templates[$1.to_sym] = template
43
- elsif template
44
- template << line
45
- end
46
- end
47
- end
48
- end
49
-
50
- def postprocess doc
51
- @@templates[:html] % [@title, Sass::Engine.new(@@templates[:style], syntax: :scss, style: :compressed).to_css, doc]
52
- end
53
-
54
- load_templates
55
- end
3
+ require 'mdx'
56
4
 
57
5
  ARGV.each do |filename|
58
- content = File.read(filename).force_encoding(Encoding::UTF_8)
59
- md = Redcarpet::Markdown.new(Title.new, fenced_code_blocks: true)
60
- html = md.render(content)
61
- File.write("#{File.dirname(filename)}/#{File.basename(filename, '.md')}.html", html)
6
+ Mdx.process filename
62
7
  end
63
-
64
- __END__
65
-
66
- @@html
67
- <!DOCTYPE html>
68
- <html>
69
- <head>
70
- <meta charset="utf-8"/>
71
- <title>%s</title>
72
- <style type="text/css">
73
- %s
74
- </style>
75
- </head>
76
- <body>
77
- <div class="content">
78
- %s
79
- </div>
80
- </body>
81
- </html>
82
-
83
- @@style
84
- html
85
- {
86
- font-size: 13px;
87
- font-family: 'Fira Sans', sans-serif;
88
- }
89
-
90
- body
91
- {
92
- margin: 0px;
93
- padding: 1em;
94
- }
95
-
96
- .content
97
- {
98
- margin: 0 auto;
99
- max-width: 50em;
100
- }
101
-
102
- h1
103
- {
104
- font-size: 1.5em;
105
- line-height: 1.2em;
106
- margin: 0 0 0.5em 0;
107
- }
108
-
109
- h2
110
- {
111
- font-size: 1.2em;
112
- line-height: 1.2em;
113
- margin: 0 0 0.25em 0;
114
- }
115
-
116
- h3
117
- {
118
- font-size: 1em;
119
- line-height: 1.2em;
120
- margin: 0px;
121
- }
122
-
123
- p
124
- {
125
- font-size: 1em;
126
- line-height: 1.5em;
127
- margin: 0 0 0.6em 0;
128
- text-align: justify;
129
- }
130
-
131
- ul
132
- {
133
- line-height: 1.5em;
134
- list-style: disc;
135
- padding: 0 0 0 1.7em;
136
- margin: 0 0 0.6em 0;
137
- }
138
-
139
- a
140
- {
141
- color: #36a;
142
- text-decoration: none;
143
- }
144
-
145
- a:hover
146
- {
147
- text-decoration: underline;
148
- }
149
-
150
- pre
151
- {
152
- font-size: 1em;
153
- line-height: 1.2em;
154
- margin: 0 0 0.6em 0;
155
- padding: 0.25em 0em 0.25em 0.5em;
156
- border-left: 0.25em solid #999;
157
- white-space: pre-wrap;
158
- }
159
-
160
- code
161
- {
162
- font-family: 'Fira Mono', monospace;
163
- font-weight: normal;
164
- }
165
-
166
- pre code
167
- {
168
- color: #333;
169
- }
170
-
171
- .string, .number, .value
172
- {
173
- color: #c12;
174
- }
175
-
176
- .keyword
177
- {
178
- color: #8a2;
179
- }
180
-
181
- .name
182
- {
183
- color: #36a;
184
- }
185
-
186
- .comment
187
- {
188
- color: #999;
189
- }
190
-
191
- blockquote
192
- {
193
- margin: 0 0 0.6em 0;
194
- padding: 0.25em 0em 0.25em 0.5em;
195
- border-left: 0.25em solid #ccc;
196
- color: #666;
197
- }
198
-
199
- hr
200
- {
201
- width: 80%;
202
- margin: 2em auto;
203
- background: #ccc;
204
- border: none;
205
- height: 1px;
206
- }
207
-
208
- table
209
- {
210
- margin: 0 0 0.6em 0;
211
- padding: 0;
212
- width: 100%;
213
- border-collapse: collapse;
214
- }
215
-
216
- table thead
217
- {
218
- border-bottom: 1px solid #333;
219
- }
220
-
221
- table th, table td
222
- {
223
- padding: 0.1em 0.25em;
224
- text-align: left;
225
- vertical-align: top;
226
- }
227
-
228
- table th
229
- {
230
- font-weight: bold;
231
- }
232
-
233
- table tbody tr:nth-child(even)
234
- {
235
- background: #eee;
236
- }
237
-
238
- p:last-child, ul:last-child, li:last-child, pre:last-child, blockquote:last-child, table:last-child
239
- {
240
- margin-bottom: 0px;
241
- }
242
-
243
- @media print
244
- {
245
- a:after {
246
- content: " (" attr(href) ")";
247
- }
248
- }
249
-
250
- $red: #c12;
251
- $blue: #09d;
252
- $green: #8a2;
253
- $yellow: #fa8;
254
- $purple: #63a;
255
- $black: #333;
256
- $gray: #999;
257
-
258
- .highlight {
259
- /* Text.Whitespace: Specially highlighted whitespace */
260
- .w {}
261
- /* Error: Lexer errors */
262
- .err {}
263
- /* Other: Token for data not matched by a parser (e.g. HTML markup in PHP code) */
264
- .x {}
265
- /* Keyword: Any keyword */
266
- .k {color: $red;}
267
- /* Keyword.Constant: Keywords that are constants */
268
- .kc {color: $blue;}
269
- /* Keyword.Declaration: Keywords used for variable declaration (e.g. var in javascript) */
270
- .kd {color: $blue;}
271
- /* Keyword.Namespace: Keywords used for namespace declarations */
272
- .kn {color: $red;}
273
- /* Keyword.Pseudo: Keywords that aren't really keywords */
274
- .kp {color: $red;}
275
- /* Keyword.Reserved: Keywords which are reserved (such as end in Ruby) */
276
- .kr {color: $red;}
277
- /* Keyword.Type: Keywords wich refer to a type id (such as int in C) */
278
- .kt {color: $blue;}
279
- /* Name: Variable/function names */
280
- .n {color: $black;}
281
- /* Name.Attribute: Attributes (in HTML for instance) */
282
- .na {color: $green;}
283
- /* Name.Builtin: Builtin names which are available in the global namespace */
284
- .nb {color: $black;}
285
- /* Name.Builtin.Pseudo: Builtin names that are implicit (such as self in Ruby) */
286
- .bp {color: $black;}
287
- /* Name.Class: For class declaration */
288
- .nc {color: $blue;}
289
- /* Name.Constant: For constants */
290
- .no {color: $blue;}
291
- /* Name.Decorator: For decorators in languages such as Python or Java */
292
- .nd {color: $black;}
293
- /* Name.Entity: Token for entitites such as &nbsp; in HTML */
294
- .ni {color: $purple;}
295
- /* Name.Exception: Exceptions and errors (e.g. ArgumentError in Ruby) */
296
- .ne {color: $blue;}
297
- /* Name.Function: Function names */
298
- .nf {color: $blue;}
299
- /* Name.Property: Token for properties */
300
- .py {color: $blue;}
301
- /* Name.Label: For label names */
302
- .nl {color: $black;}
303
- /* Name.Namespace: Token for namespaces */
304
- .nn {color: $red;}
305
- /* Name.Other: For other names */
306
- .nx {color: $black;}
307
- /* Name.Tag: Tag mainly for markup such as XML or HTML */
308
- .nt {color: $red;}
309
- /* Name.Variable: Token for variables */
310
- .nv {color: $black;}
311
- /* Name.Variable.Class: Token for class variables (e.g. @@var in Ruby) */
312
- .vc {color: $black;}
313
- /* Name.Variable.Global: For global variables (such as $LOAD_PATH in Ruby) */
314
- .vg {color: $black;}
315
- /* Name.Variable.Instance: Token for instance variables (such as @var in Ruby) */
316
- .vi {color: $black;}
317
- /* Literal: Any literal (if not further defined) */
318
- .l {color: $purple;}
319
- /* Literal.Date: Date literals */
320
- .ld {color: $purple;}
321
- /* Literal.String: String literals */
322
- .s {color: $yellow;}
323
- /* Literal.String.Backtick: String enclosed in backticks */
324
- .sb {color: $yellow;}
325
- /* Literal.String.Char: Token type for single characters */
326
- .sc {color: $yellow;}
327
- /* Literal.String.Doc: Documentation strings (such as in Python) */
328
- .sd {color: $yellow;}
329
- /* Literal.String.Double: Double quoted strings */
330
- .s2 {color: $yellow;}
331
- /* Literal.String.Escape: Escaped sequences in strings */
332
- .se {color: $purple;}
333
- /* Literal.String.Heredoc: For "heredoc" strings (e.g. in Ruby) */
334
- .sh {color: $yellow;}
335
- /* Literal.String.Interpol: For interpoled part in strings (e.g. in Ruby) */
336
- .si {color: $yellow;}
337
- /* Literal.String.Other: Token type for any other strings (for example %q{foo} string constructs in Ruby) */
338
- .sx {color: $yellow;}
339
- /* Literal.String.Regex: Regular expressions literals */
340
- .sr {color: $yellow;}
341
- /* Literal.String.Single: Single quoted strings */
342
- .s1 {color: $yellow;}
343
- /* Literal.String.Symbol: Symbols (such as :foo in Ruby) */
344
- .ss {color: $purple;}
345
- /* Literal.Number: Any number literal (if not further defined) */
346
- .m {color: $purple;}
347
- /* Literal.Number.Float: Float numbers */
348
- .mf {color: $purple;}
349
- /* Literal.Number.Hex: Hexadecimal numbers */
350
- .mh {color: $purple;}
351
- /* Literal.Number.Integer: Integer literals */
352
- .mi {color: $purple;}
353
- /* Literal.Number.Integer.Long: Long interger literals */
354
- .il {color: $purple;}
355
- /* Literal.Number.Oct: Octal literals */
356
- .mo {color: $purple;}
357
- /* Operator: Operators (commonly +, -, /, *) */
358
- .o {color: $red;}
359
- /* Operator.Word: Word operators (e.g. and) */
360
- .ow {color: $red;}
361
- /* Punctuation: Punctuation which is not an operator */
362
- .p {color: $black;}
363
- /* Comment: Single ligne comments */
364
- .c {color: $gray;}
365
- /* Comment.Multiline: Mutliline comments */
366
- .cm {color: $gray;}
367
- /* Comment.Preproc: Preprocessor comments such as <% %> in ERb */
368
- .cp {color: $gray;}
369
- /* Comment.Single: Comments that end at the end of the line */
370
- .c1 {color: $gray;}
371
- /* Comment.Special: Special data in comments such as @license in Javadoc */
372
- .cs {color: $gray;}
373
- /* Generic: Unstyled token */
374
- .g {color: $black;}
375
- /* Generic.Deleted: Token value as deleted */
376
- .gd {color: $red;}
377
- /* Generic.Emph: Token value as emphasized */
378
- .ge {font-style: italic; color: $black;}
379
- /* Generic.Error: Token value as an error message */
380
- .gr {color: $red;}
381
- /* Generic.Heading: Token value as a headline */
382
- .gh {font-weight: bold; color: $black;}
383
- /* Generic.Inserted: Token value as inserted */
384
- .gi {color: $green;}
385
- /* Generic.Output: Marked as a program output */
386
- .go {color: $black;}
387
- /* Generic.Prompt: Marked as a command prompt */
388
- .gp {color: $black;}
389
- /* Generic.Strong: Mark the token value as bold (for rst lexer) */
390
- .gs {font-weight: bold; color: $black;}
391
- /* Generic.Subheading: Marked as a subheadline */
392
- .gu {font-weight: bold; color: $black;}
393
- /* Generic.Traceback: Mark the token as a part of an error traceback */
394
- .gt {color: $black;}
395
- /* Generic.Lineno: Line numbers */
396
- .gl {color: $gray;}
397
- }
@@ -0,0 +1,398 @@
1
+ require 'rubygems'
2
+ require 'redcarpet'
3
+ require 'rouge'
4
+ require 'rouge/plugins/redcarpet'
5
+ require 'sass'
6
+
7
+ module Mdx
8
+ class MdxRender < Redcarpet::Render::XHTML
9
+ include Rouge::Plugins::Redcarpet
10
+
11
+ attr_reader :title
12
+
13
+ def initialize
14
+ @level = 8
15
+ super
16
+ end
17
+
18
+ def header title, level
19
+ if level < @level || !@title
20
+ @title = title
21
+ @level = level
22
+ end
23
+ "<h#{level}>#{title}</h#{level}>"
24
+ end
25
+
26
+ def self.load_templates
27
+ @@templates = {}
28
+
29
+ begin
30
+ io = File.read(__FILE__).force_encoding(Encoding::UTF_8)
31
+ app, data = io.gsub("\r\n", "\n").split(/^__END__$/, 2)
32
+ rescue Errno::ENOENT
33
+ app, data = nil
34
+ end
35
+
36
+ if data
37
+ template = nil
38
+ data.each_line do |line|
39
+ if line =~ /^@@\s*(.*\S)\s*$/
40
+ template = ''
41
+ @@templates[$1.to_sym] = template
42
+ elsif template
43
+ template << line
44
+ end
45
+ end
46
+ end
47
+
48
+ @@default_style = Sass::Engine.new(@@templates[:style], syntax: :scss, style: :compressed).to_css
49
+ end
50
+
51
+ def postprocess doc
52
+ style = @style || @@default_style
53
+ @@templates[:html] % [@title, style, doc]
54
+ end
55
+
56
+ load_templates
57
+ end
58
+
59
+ def self.process filename, options = {}
60
+ content = File.read(filename).force_encoding(Encoding::UTF_8)
61
+ md = Redcarpet::Markdown.new(MdxRender.new, fenced_code_blocks: true)
62
+ html = md.render(content)
63
+ File.write("#{File.dirname(filename)}/#{File.basename(filename, '.md')}.html", html)
64
+ end
65
+ end
66
+
67
+ __END__
68
+
69
+ @@html
70
+ <!DOCTYPE html>
71
+ <html>
72
+ <head>
73
+ <meta charset="utf-8"/>
74
+ <title>%s</title>
75
+ <style type="text/css">
76
+ %s</style>
77
+ </head>
78
+ <body>
79
+ <div class="content">
80
+ %s</div>
81
+ </body>
82
+ </html>
83
+
84
+ @@style
85
+ html
86
+ {
87
+ font-size: 13px;
88
+ font-family: 'Fira Sans', sans-serif;
89
+ }
90
+
91
+ body
92
+ {
93
+ margin: 0px;
94
+ padding: 1em;
95
+ }
96
+
97
+ .content
98
+ {
99
+ margin: 0 auto;
100
+ max-width: 50em;
101
+ }
102
+
103
+ h1
104
+ {
105
+ font-size: 1.5em;
106
+ line-height: 1.2em;
107
+ margin: 0 0 0.5em 0;
108
+ }
109
+
110
+ h2
111
+ {
112
+ font-size: 1.2em;
113
+ line-height: 1.2em;
114
+ margin: 0 0 0.25em 0;
115
+ }
116
+
117
+ h3
118
+ {
119
+ font-size: 1em;
120
+ line-height: 1.2em;
121
+ margin: 0px;
122
+ }
123
+
124
+ p
125
+ {
126
+ font-size: 1em;
127
+ line-height: 1.5em;
128
+ margin: 0 0 0.6em 0;
129
+ text-align: justify;
130
+ }
131
+
132
+ ul
133
+ {
134
+ line-height: 1.5em;
135
+ list-style: disc;
136
+ padding: 0 0 0 1.7em;
137
+ margin: 0 0 0.6em 0;
138
+ }
139
+
140
+ a
141
+ {
142
+ color: #36a;
143
+ text-decoration: none;
144
+ }
145
+
146
+ a:hover
147
+ {
148
+ text-decoration: underline;
149
+ }
150
+
151
+ pre
152
+ {
153
+ font-size: 1em;
154
+ line-height: 1.2em;
155
+ margin: 0 0 0.6em 0;
156
+ padding: 0.25em 0em 0.25em 0.5em;
157
+ border-left: 0.25em solid #ccc;
158
+ white-space: pre-wrap;
159
+ }
160
+
161
+ code
162
+ {
163
+ font-family: 'Fira Mono', monospace;
164
+ font-weight: 500;
165
+ }
166
+
167
+ pre code
168
+ {
169
+ color: #333;
170
+ }
171
+
172
+ .string, .number, .value
173
+ {
174
+ color: #c12;
175
+ }
176
+
177
+ .keyword
178
+ {
179
+ color: #8a2;
180
+ }
181
+
182
+ .name
183
+ {
184
+ color: #36a;
185
+ }
186
+
187
+ .comment
188
+ {
189
+ color: #999;
190
+ }
191
+
192
+ blockquote
193
+ {
194
+ margin: 0 0 0.6em 0;
195
+ padding: 0.25em 0em 0.25em 0.5em;
196
+ border-left: 0.25em solid #ccc;
197
+ color: #666;
198
+ }
199
+
200
+ hr
201
+ {
202
+ width: 80%;
203
+ margin: 2em auto;
204
+ background: #ccc;
205
+ border: none;
206
+ height: 1px;
207
+ }
208
+
209
+ table
210
+ {
211
+ margin: 0 0 0.6em 0;
212
+ padding: 0;
213
+ width: 100%;
214
+ border-collapse: collapse;
215
+ }
216
+
217
+ table thead
218
+ {
219
+ border-bottom: 1px solid #333;
220
+ }
221
+
222
+ table th, table td
223
+ {
224
+ padding: 0.1em 0.25em;
225
+ text-align: left;
226
+ vertical-align: top;
227
+ }
228
+
229
+ table th
230
+ {
231
+ font-weight: bold;
232
+ }
233
+
234
+ table tbody tr:nth-child(even)
235
+ {
236
+ background: #eee;
237
+ }
238
+
239
+ p:last-child, ul:last-child, li:last-child, pre:last-child, blockquote:last-child, table:last-child
240
+ {
241
+ margin-bottom: 0px;
242
+ }
243
+
244
+ @media print
245
+ {
246
+ a:after {
247
+ content: " (" attr(href) ")";
248
+ }
249
+ }
250
+
251
+ $red: #c12;
252
+ $blue: #09d;
253
+ $green: #8a2;
254
+ $yellow: #e91;
255
+ $purple: #63a;
256
+ $black: #333;
257
+ $gray: #999;
258
+
259
+ .highlight {
260
+ /* Text.Whitespace: Specially highlighted whitespace */
261
+ .w {}
262
+ /* Error: Lexer errors */
263
+ .err {}
264
+ /* Other: Token for data not matched by a parser (e.g. HTML markup in PHP code) */
265
+ .x {}
266
+ /* Keyword: Any keyword */
267
+ .k {color: $red;}
268
+ /* Keyword.Constant: Keywords that are constants */
269
+ .kc {color: $blue;}
270
+ /* Keyword.Declaration: Keywords used for variable declaration (e.g. var in javascript) */
271
+ .kd {color: $blue;}
272
+ /* Keyword.Namespace: Keywords used for namespace declarations */
273
+ .kn {color: $red;}
274
+ /* Keyword.Pseudo: Keywords that aren't really keywords */
275
+ .kp {color: $red;}
276
+ /* Keyword.Reserved: Keywords which are reserved (such as end in Ruby) */
277
+ .kr {color: $red;}
278
+ /* Keyword.Type: Keywords wich refer to a type id (such as int in C) */
279
+ .kt {color: $blue;}
280
+ /* Name: Variable/function names */
281
+ .n {color: $black;}
282
+ /* Name.Attribute: Attributes (in HTML for instance) */
283
+ .na {color: $green;}
284
+ /* Name.Builtin: Builtin names which are available in the global namespace */
285
+ .nb {color: $black;}
286
+ /* Name.Builtin.Pseudo: Builtin names that are implicit (such as self in Ruby) */
287
+ .bp {color: $black;}
288
+ /* Name.Class: For class declaration */
289
+ .nc {color: $blue;}
290
+ /* Name.Constant: For constants */
291
+ .no {color: $blue;}
292
+ /* Name.Decorator: For decorators in languages such as Python or Java */
293
+ .nd {color: $black;}
294
+ /* Name.Entity: Token for entitites such as &nbsp; in HTML */
295
+ .ni {color: $purple;}
296
+ /* Name.Exception: Exceptions and errors (e.g. ArgumentError in Ruby) */
297
+ .ne {color: $blue;}
298
+ /* Name.Function: Function names */
299
+ .nf {color: $blue;}
300
+ /* Name.Property: Token for properties */
301
+ .py {color: $blue;}
302
+ /* Name.Label: For label names */
303
+ .nl {color: $black;}
304
+ /* Name.Namespace: Token for namespaces */
305
+ .nn {color: $red;}
306
+ /* Name.Other: For other names */
307
+ .nx {color: $black;}
308
+ /* Name.Tag: Tag mainly for markup such as XML or HTML */
309
+ .nt {color: $red;}
310
+ /* Name.Variable: Token for variables */
311
+ .nv {color: $black;}
312
+ /* Name.Variable.Class: Token for class variables (e.g. @@var in Ruby) */
313
+ .vc {color: $black;}
314
+ /* Name.Variable.Global: For global variables (such as $LOAD_PATH in Ruby) */
315
+ .vg {color: $black;}
316
+ /* Name.Variable.Instance: Token for instance variables (such as @var in Ruby) */
317
+ .vi {color: $black;}
318
+ /* Literal: Any literal (if not further defined) */
319
+ .l {color: $purple;}
320
+ /* Literal.Date: Date literals */
321
+ .ld {color: $purple;}
322
+ /* Literal.String: String literals */
323
+ .s {color: $yellow;}
324
+ /* Literal.String.Backtick: String enclosed in backticks */
325
+ .sb {color: $yellow;}
326
+ /* Literal.String.Char: Token type for single characters */
327
+ .sc {color: $yellow;}
328
+ /* Literal.String.Doc: Documentation strings (such as in Python) */
329
+ .sd {color: $yellow;}
330
+ /* Literal.String.Double: Double quoted strings */
331
+ .s2 {color: $yellow;}
332
+ /* Literal.String.Escape: Escaped sequences in strings */
333
+ .se {color: $purple;}
334
+ /* Literal.String.Heredoc: For "heredoc" strings (e.g. in Ruby) */
335
+ .sh {color: $yellow;}
336
+ /* Literal.String.Interpol: For interpoled part in strings (e.g. in Ruby) */
337
+ .si {color: $yellow;}
338
+ /* Literal.String.Other: Token type for any other strings (for example %q{foo} string constructs in Ruby) */
339
+ .sx {color: $yellow;}
340
+ /* Literal.String.Regex: Regular expressions literals */
341
+ .sr {color: $yellow;}
342
+ /* Literal.String.Single: Single quoted strings */
343
+ .s1 {color: $yellow;}
344
+ /* Literal.String.Symbol: Symbols (such as :foo in Ruby) */
345
+ .ss {color: $purple;}
346
+ /* Literal.Number: Any number literal (if not further defined) */
347
+ .m {color: $purple;}
348
+ /* Literal.Number.Float: Float numbers */
349
+ .mf {color: $purple;}
350
+ /* Literal.Number.Hex: Hexadecimal numbers */
351
+ .mh {color: $purple;}
352
+ /* Literal.Number.Integer: Integer literals */
353
+ .mi {color: $purple;}
354
+ /* Literal.Number.Integer.Long: Long interger literals */
355
+ .il {color: $purple;}
356
+ /* Literal.Number.Oct: Octal literals */
357
+ .mo {color: $purple;}
358
+ /* Operator: Operators (commonly +, -, /, *) */
359
+ .o {color: $red;}
360
+ /* Operator.Word: Word operators (e.g. and) */
361
+ .ow {color: $red;}
362
+ /* Punctuation: Punctuation which is not an operator */
363
+ .p {color: $black;}
364
+ /* Comment: Single ligne comments */
365
+ .c {color: $gray;}
366
+ /* Comment.Multiline: Mutliline comments */
367
+ .cm {color: $gray;}
368
+ /* Comment.Preproc: Preprocessor comments such as <% %> in ERb */
369
+ .cp {color: $gray;}
370
+ /* Comment.Single: Comments that end at the end of the line */
371
+ .c1 {color: $gray;}
372
+ /* Comment.Special: Special data in comments such as @license in Javadoc */
373
+ .cs {color: $gray;}
374
+ /* Generic: Unstyled token */
375
+ .g {color: $black;}
376
+ /* Generic.Deleted: Token value as deleted */
377
+ .gd {color: $red;}
378
+ /* Generic.Emph: Token value as emphasized */
379
+ .ge {font-style: italic; color: $black;}
380
+ /* Generic.Error: Token value as an error message */
381
+ .gr {color: $red;}
382
+ /* Generic.Heading: Token value as a headline */
383
+ .gh {font-weight: bold; color: $black;}
384
+ /* Generic.Inserted: Token value as inserted */
385
+ .gi {color: $green;}
386
+ /* Generic.Output: Marked as a program output */
387
+ .go {color: $black;}
388
+ /* Generic.Prompt: Marked as a command prompt */
389
+ .gp {color: $black;}
390
+ /* Generic.Strong: Mark the token value as bold (for rst lexer) */
391
+ .gs {font-weight: bold; color: $black;}
392
+ /* Generic.Subheading: Marked as a subheadline */
393
+ .gu {font-weight: bold; color: $black;}
394
+ /* Generic.Traceback: Mark the token as a part of an error traceback */
395
+ .gt {color: $black;}
396
+ /* Generic.Lineno: Line numbers */
397
+ .gl {color: $gray;}
398
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kext
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-01 00:00:00.000000000 Z
11
+ date: 2015-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet
@@ -60,6 +60,7 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - bin/mdx
63
+ - lib/mdx.rb
63
64
  homepage: http://rubygems.org/gems/mdx
64
65
  licenses:
65
66
  - Public Domain