middleman-vegas 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4527a53fcaf6b02d9bd1eaafb97cfd43df9dbe4d
4
- data.tar.gz: 30fd3693183886410994592ec605b837ffa3f01d
3
+ metadata.gz: 24748f761404a73f146af22db1d5dcc51514fcc5
4
+ data.tar.gz: 0a8e6464258e17238ae4a95866833e08eba5f466
5
5
  SHA512:
6
- metadata.gz: 0fb805d176874e17d4a77f4e2294a227a40bb69d627511d4b94a79fd5311ae205e117e07ef2c66369821590fd7de7e03e7c6f0b86933e6199b092c0e814a4c4f
7
- data.tar.gz: f5bcad72864d70e3d06c13261e399455b7b4110915602af0f08ac0847e79e083b5f378be16eb84dc5a10501c33c4678e5ec2067e2fe4c0f14bee9e55d3691351
6
+ metadata.gz: fba1430acda464592330657ce0ded5d17e4a187f7701a86d0fcdcf6706d7a67ba20a8c36473ef32007034f3272834484ef1aac8aa67b19dc50e4470b7bbbfec2
7
+ data.tar.gz: 5777d9839123f94ffe723446b8fe8433d68134653d9dd233a9f4eb78583ba0f27b8fa556a67bcc02991cdde7ec114c3d927c17ab1767c96be8b2208d8cd18178
@@ -1,5 +1,4 @@
1
1
  require 'middleman-vegas/formatters/table_formatter'
2
- require 'middleman-vegas/lexers/habitat_studio'
3
2
 
4
3
  module Middleman
5
4
  module Vegas
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Vegas
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-vegas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franklin Webber
@@ -87,7 +87,6 @@ files:
87
87
  - lib/middleman-vegas/extension.rb
88
88
  - lib/middleman-vegas/formatters/table_formatter.rb
89
89
  - lib/middleman-vegas/highlighter.rb
90
- - lib/middleman-vegas/lexers/habitat_studio.rb
91
90
  - lib/middleman-vegas/markdown_parser.rb
92
91
  - lib/middleman-vegas/options_parser.rb
93
92
  - lib/middleman-vegas/redcarpet_code_renderer.rb
@@ -1,164 +0,0 @@
1
- require 'rouge'
2
-
3
- module Middleman
4
- module Vegas
5
- class HabitatStudio < Rouge::RegexLexer
6
- title "studio"
7
- desc "Habitat Studio uses bash but there are a few binaries, aliases, and functions that already exist"
8
-
9
- tag 'studio'
10
-
11
- KEYWORDS = %w(
12
- if fi else while do done for then return function
13
- select continue until esac elif in
14
- ).join('|')
15
-
16
- BUILTINS = %w(
17
- hab build sl sup-log
18
- ).join('|')
19
-
20
- state :basic do
21
- rule /#.*$/, Comment
22
-
23
- rule /\b(#{KEYWORDS})\s*\b/, Keyword
24
- rule /\bcase\b/, Keyword, :case
25
-
26
- rule /\b(#{BUILTINS})\s*\b(?!(\.|-))/, Name::Builtin
27
- rule /[.](?=\s)/, Name::Builtin
28
-
29
- rule /(\b\w+)(=)/ do |m|
30
- groups Name::Variable, Operator
31
- end
32
-
33
- rule /[\[\]{}()!=>]/, Operator
34
- rule /&&|\|\|/, Operator
35
-
36
- # here-string
37
- rule /<<</, Operator
38
-
39
- rule /(<<-?)(\s*)(\'?)(\\?)(\w+)(\3)/ do |m|
40
- groups Operator, Text, Str::Heredoc, Str::Heredoc, Name::Constant, Str::Heredoc
41
- @heredocstr = Regexp.escape(m[5])
42
- push :heredoc
43
- end
44
- end
45
-
46
- state :heredoc do
47
- rule /\n/, Str::Heredoc, :heredoc_nl
48
- rule /[^$\n]+/, Str::Heredoc
49
- mixin :interp
50
- rule /[$]/, Str::Heredoc
51
- end
52
-
53
- state :heredoc_nl do
54
- rule /\s*(\w+)\s*\n/ do |m|
55
- if m[1] == @heredocstr
56
- token Name::Constant
57
- pop! 2
58
- else
59
- token Str::Heredoc
60
- end
61
- end
62
-
63
- rule(//) { pop! }
64
- end
65
-
66
-
67
- state :double_quotes do
68
- # NB: "abc$" is literally the string abc$.
69
- # Here we prevent :interp from interpreting $" as a variable.
70
- rule /(?:\$#?)?"/, Str::Double, :pop!
71
- mixin :interp
72
- rule /[^"`\\$]+/, Str::Double
73
- end
74
-
75
- state :ansi_string do
76
- rule /\\./, Str::Escape
77
- rule /[^\\']+/, Str::Single
78
- mixin :single_quotes
79
- end
80
-
81
- state :single_quotes do
82
- rule /'/, Str::Single, :pop!
83
- rule /[^']+/, Str::Single
84
- end
85
-
86
- state :data do
87
- rule /\s+/, Text
88
- rule /\\./, Str::Escape
89
- rule /\$?"/, Str::Double, :double_quotes
90
- rule /\$'/, Str::Single, :ansi_string
91
-
92
- # single quotes are much easier than double quotes - we can
93
- # literally just scan until the next single quote.
94
- # POSIX: Enclosing characters in single-quotes ( '' )
95
- # shall preserve the literal value of each character within the
96
- # single-quotes. A single-quote cannot occur within single-quotes.
97
- rule /'/, Str::Single, :single_quotes
98
-
99
- rule /\*/, Keyword
100
-
101
- rule /;/, Punctuation
102
-
103
- rule /--?[\w-]+/, Name::Tag
104
- rule /[^=\*\s{}()$"'`;\\<]+/, Text
105
- rule /\d+(?= |\Z)/, Num
106
- rule /</, Text
107
- mixin :interp
108
- end
109
-
110
- state :curly do
111
- rule /}/, Keyword, :pop!
112
- rule /:-/, Keyword
113
- rule /[a-zA-Z0-9_]+/, Name::Variable
114
- rule /[^}:"`'$]+/, Punctuation
115
- mixin :root
116
- end
117
-
118
- state :paren do
119
- rule /\)/, Keyword, :pop!
120
- mixin :root
121
- end
122
-
123
- state :math do
124
- rule /\)\)/, Keyword, :pop!
125
- rule %r([-+*/%^|&!]|\*\*|\|\|), Operator
126
- rule /\d+(#\w+)?/, Num
127
- mixin :root
128
- end
129
-
130
- state :case do
131
- rule /\besac\b/, Keyword, :pop!
132
- rule /\|/, Punctuation
133
- rule /\)/, Punctuation, :case_stanza
134
- mixin :root
135
- end
136
-
137
- state :case_stanza do
138
- rule /;;/, Punctuation, :pop!
139
- mixin :root
140
- end
141
-
142
- state :backticks do
143
- rule /`/, Str::Backtick, :pop!
144
- mixin :root
145
- end
146
-
147
- state :interp do
148
- rule /\\$/, Str::Escape # line continuation
149
- rule /\\./, Str::Escape
150
- rule /\$\(\(/, Keyword, :math
151
- rule /\$\(/, Keyword, :paren
152
- rule /\${#?/, Keyword, :curly
153
- rule /`/, Str::Backtick, :backticks
154
- rule /\$#?(\w+|.)/, Name::Variable
155
- rule /\$[*@]/, Name::Variable
156
- end
157
-
158
- state :root do
159
- mixin :basic
160
- mixin :data
161
- end
162
- end
163
- end
164
- end