middleman-syntax 3.4.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +6 -2
- data/.gitignore +2 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile +7 -10
- data/README.md +44 -14
- data/Rakefile +3 -3
- data/features/extra_css_classes.feature +55 -0
- data/features/lexer_options.feature +19 -0
- data/features/support/env.rb +0 -1
- data/features/support/step_definitions.rb +10 -0
- data/fixtures/test-app-extra-css-classes/config.rb +1 -0
- data/fixtures/test-app-extra-css-classes/source/index.html.erb +5 -0
- data/lib/middleman-syntax/extension.rb +1 -0
- data/lib/middleman-syntax/formatters.rb +10 -1
- data/lib/middleman-syntax/highlighter.rb +5 -4
- data/lib/middleman-syntax/version.rb +1 -1
- data/middleman-syntax.gemspec +0 -6
- metadata +11 -75
- data/.devcontainer/Dockerfile +0 -19
- data/.devcontainer/devcontainer.json +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30c25881bfd1e91ef4958299d4e09fe9848a4581fe3b22bdaf9aad0ae13e2723
|
4
|
+
data.tar.gz: 8ed74ea53b6e515c01be63330170110d809f87bf48715fe386245c939cac8998
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 390e71b77bb6d00ebbc57b2702ba4731aa00a0778cfa2caa121d80296aa50b978a6a191620f93bcecf5127104128618e65987754d179a65c79a4675013e35717
|
7
|
+
data.tar.gz: df4eb1fec24e35e553d92e346d0b2dad4f368064a4926e3cc0a4a0bcb102eec2a17acfc652ee3151c057db75b76cb410c8452cd159202e340e3e1b8157455acb
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
name: CI
|
2
2
|
|
3
|
-
on:
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [master]
|
6
|
+
pull_request:
|
7
|
+
branches: [master]
|
4
8
|
|
5
9
|
jobs:
|
6
10
|
test:
|
@@ -9,7 +13,7 @@ jobs:
|
|
9
13
|
strategy:
|
10
14
|
fail-fast: false
|
11
15
|
matrix:
|
12
|
-
ruby-version: ["3.3", "3.2", "3.1", "3.0", "2.7"
|
16
|
+
ruby-version: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
|
13
17
|
steps:
|
14
18
|
- uses: actions/checkout@v4
|
15
19
|
- name: Set up Ruby
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
# 3.6.0
|
6
|
+
|
7
|
+
- Lexer options don't get passed to lexer (#92).
|
8
|
+
|
9
|
+
# 3.5.0
|
10
|
+
|
11
|
+
- Remove official support for Ruby 2.5 and 2.6 (#89).
|
12
|
+
- Add ability to add other classes to the :syntax plugin (#90).
|
13
|
+
|
5
14
|
# 3.4.0
|
6
15
|
|
7
16
|
- Haml 6 support (#82, #84).
|
data/Gemfile
CHANGED
@@ -10,15 +10,12 @@ gem 'rake', '~> 13.1', require: false
|
|
10
10
|
gem 'yard', '~> 0.9', require: false
|
11
11
|
|
12
12
|
# Test tools
|
13
|
-
gem '
|
14
|
-
gem '
|
15
|
-
gem '
|
16
|
-
|
17
|
-
|
13
|
+
gem 'aruba'
|
14
|
+
gem 'cucumber'
|
15
|
+
gem 'capybara'
|
16
|
+
|
17
|
+
# Optional dependencies, included for tests
|
18
18
|
gem 'haml', RUBY_VERSION > '3.0' ? '< 7' : '< 6'
|
19
|
-
gem 'slim'
|
19
|
+
gem 'slim'
|
20
20
|
gem 'kramdown'
|
21
|
-
gem
|
22
|
-
|
23
|
-
# For old Rubies
|
24
|
-
gem 'nokogiri', '~> 1.12.0'
|
21
|
+
gem 'redcarpet'
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# Middleman-Syntax
|
2
2
|
|
3
|
-
`middleman-syntax` is an extension for the [Middleman] static site generator that adds syntax highlighting via [Rouge](https://github.com/jayferd/rouge).
|
3
|
+
`middleman-syntax` is an extension for the [Middleman](https://middlemanapp.com) static site generator that adds syntax highlighting via [Rouge](https://github.com/jayferd/rouge).
|
4
4
|
|
5
|
-
[]
|
5
|
+
[](https://rubygems.org/gems/middleman-syntax)
|
6
6
|
[](https://github.com/middleman/middleman-syntax/actions/workflows/ci.yml)
|
7
|
-
[](https://qlty.sh/gh/middleman/projects/middleman-syntax)
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -29,6 +29,18 @@ You can also pass options to Rouge:
|
|
29
29
|
activate :syntax, :line_numbers => true
|
30
30
|
```
|
31
31
|
|
32
|
+
You can add extra css classes to the pre tag elements:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
activate :syntax, :extra_css_classes => ["custom-class", "another-class"]
|
36
|
+
```
|
37
|
+
|
38
|
+
This will add the extra css classes to the `<pre>` element in the generated HTML:
|
39
|
+
|
40
|
+
```html
|
41
|
+
<div class="highlight"><pre class="highlight language-name custom-class another-class"><code>...</code></pre></div>
|
42
|
+
```
|
43
|
+
|
32
44
|
The full set of options can be seen on your preview server's `/__middleman/config/` page.
|
33
45
|
|
34
46
|
## Helper
|
@@ -47,7 +59,7 @@ end
|
|
47
59
|
<% end %>
|
48
60
|
```
|
49
61
|
|
50
|
-
|
62
|
+
**NOTE:** In Haml, use `=`, not `-`:
|
51
63
|
|
52
64
|
```haml
|
53
65
|
= code('ruby') do
|
@@ -70,6 +82,7 @@ The `code` helper supports [Rouge](https://github.com/jayferd/rouge) instance fo
|
|
70
82
|
* `start_line`
|
71
83
|
* `css_class`
|
72
84
|
* `wrap`
|
85
|
+
* `extra_css_classes`
|
73
86
|
|
74
87
|
To use these formatter options per code block, include them in a hash as the second argument. e.g.
|
75
88
|
|
@@ -81,19 +94,41 @@ end
|
|
81
94
|
<% end %>
|
82
95
|
```
|
83
96
|
|
97
|
+
You can also add extra css classes to specific code blocks:
|
98
|
+
|
99
|
+
```erb
|
100
|
+
<% code("ruby", :extra_css_classes => ["custom-class", "special"]) do %>
|
101
|
+
def my_cool_method(message)
|
102
|
+
puts message
|
103
|
+
end
|
104
|
+
<% end %>
|
105
|
+
```
|
106
|
+
|
107
|
+
This will produce HTML like:
|
108
|
+
|
109
|
+
```html
|
110
|
+
<div class="highlight"><pre class="highlight ruby custom-class special"><code>...</code></pre></div>
|
111
|
+
```
|
112
|
+
|
84
113
|
## CSS
|
85
114
|
|
86
115
|
On a default (i.e. unstyled) Middleman project, it will appear as if `middleman-syntax` isn't working, since obviously no CSS has been applied to color your code. You can use any Pygments-compatible stylesheet to style your code.
|
87
116
|
|
88
|
-
You can also let Rouge generate some CSS for you by creating a new stylesheet with a `.css.erb` extension in your Middleman project (at a path like `source/stylesheets/highlighting.css.erb` with the contents:
|
117
|
+
You can also let Rouge generate some CSS for you by creating a new stylesheet with a `.css.erb` extension in your Middleman project (at a path like `source/stylesheets/highlighting.css.erb`) with the contents:
|
89
118
|
|
90
119
|
```erb
|
91
120
|
<%= Rouge::Themes::ThankfulEyes.render(:scope => '.highlight') %>
|
92
121
|
```
|
93
122
|
|
94
|
-
|
123
|
+
And then include it in your layout or specific page by:
|
95
124
|
|
96
|
-
|
125
|
+
```erb
|
126
|
+
<%= stylesheet_link_tag "highlighting" %>
|
127
|
+
```
|
128
|
+
|
129
|
+
If you want to include this in a larger Sass stylesheet, include it in your main stylesheet with `@import 'highlighting.css'`.
|
130
|
+
|
131
|
+
Rouge has `ThankfulEyes`, `Colorful`, `Github`, `Base16`, `Base16::Solarized`, `Base16::Monokai`, and `Monokai` themes.
|
97
132
|
|
98
133
|
## Markdown
|
99
134
|
|
@@ -108,7 +143,7 @@ set :markdown, :fenced_code_blocks => true, :smartypants => true
|
|
108
143
|
set :markdown_engine, :kramdown
|
109
144
|
```
|
110
145
|
|
111
|
-
Now your Markdown will work just like it does [on GitHub](
|
146
|
+
Now your Markdown will work just like it does [on GitHub](https://docs.github.com/en/get-started/writing-on-github) - you can write something like this with Redcarpet:
|
112
147
|
|
113
148
|
<pre>
|
114
149
|
```ruby
|
@@ -198,9 +233,4 @@ The best way to get quick responses to your issues and swift fixes to your bugs
|
|
198
233
|
|
199
234
|
## License
|
200
235
|
|
201
|
-
Copyright (c) 2012-2014 Benjamin Hollis. MIT Licensed, see [LICENSE] for details.
|
202
|
-
|
203
|
-
[middleman]: http://middlemanapp.com
|
204
|
-
[gem]: https://rubygems.org/gems/middleman-syntax
|
205
|
-
[codeclimate]: https://codeclimate.com/github/middleman/middleman-syntax
|
206
|
-
[LICENSE]: https://github.com/middleman/middleman-syntax/blob/master/LICENSE.md
|
236
|
+
Copyright (c) 2012-2014 Benjamin Hollis. MIT Licensed, see [LICENSE](LICENSE.md) for details.
|
data/Rakefile
CHANGED
@@ -2,9 +2,9 @@ require 'bundler/gem_tasks'
|
|
2
2
|
require 'cucumber/rake/task'
|
3
3
|
|
4
4
|
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
|
5
|
-
exempt_tags = ""
|
6
|
-
exempt_tags << "--tags
|
7
|
-
t.cucumber_opts = "--
|
5
|
+
exempt_tags = ["--tags 'not @wip'"]
|
6
|
+
exempt_tags << "--tags 'not @nojava'" if RUBY_PLATFORM == "java"
|
7
|
+
t.cucumber_opts = "--require features --color #{exempt_tags.join(' ')} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}"
|
8
8
|
end
|
9
9
|
|
10
10
|
task :test => ["cucumber"]
|
@@ -0,0 +1,55 @@
|
|
1
|
+
Feature: Extra css classes for the pre tag
|
2
|
+
|
3
|
+
Scenario: Extra css classes from configuration
|
4
|
+
Given a fixture app "test-app-extra-css-classes"
|
5
|
+
And a file named "config.rb" with:
|
6
|
+
"""
|
7
|
+
activate :syntax, :extra_css_classes => ["custom-class", "another-class"]
|
8
|
+
"""
|
9
|
+
And a file named "source/index.html.erb" with:
|
10
|
+
"""
|
11
|
+
<% code("ruby") do %>
|
12
|
+
def my_method
|
13
|
+
puts "Hello"
|
14
|
+
end
|
15
|
+
<% end %>
|
16
|
+
"""
|
17
|
+
And the Server is running
|
18
|
+
When I go to "/index.html"
|
19
|
+
Then I should see '<pre class="highlight ruby custom-class another-class"><code>'
|
20
|
+
|
21
|
+
Scenario: Extra css classes as a string
|
22
|
+
Given a fixture app "test-app-extra-css-classes"
|
23
|
+
And a file named "config.rb" with:
|
24
|
+
"""
|
25
|
+
activate :syntax, :extra_css_classes => "custom-class another-class"
|
26
|
+
"""
|
27
|
+
And a file named "source/index.html.erb" with:
|
28
|
+
"""
|
29
|
+
<% code("ruby") do %>
|
30
|
+
def my_method
|
31
|
+
puts "Hello"
|
32
|
+
end
|
33
|
+
<% end %>
|
34
|
+
"""
|
35
|
+
And the Server is running
|
36
|
+
When I go to "/index.html"
|
37
|
+
Then I should see '<pre class="highlight ruby custom-class another-class"><code>'
|
38
|
+
|
39
|
+
Scenario: Extra css classes via helper options
|
40
|
+
Given a fixture app "test-app-extra-css-classes"
|
41
|
+
And a file named "config.rb" with:
|
42
|
+
"""
|
43
|
+
activate :syntax
|
44
|
+
"""
|
45
|
+
And a file named "source/index.html.erb" with:
|
46
|
+
"""
|
47
|
+
<% code("ruby", :extra_css_classes => ["helper-class", "another-helper-class"]) do %>
|
48
|
+
def my_method
|
49
|
+
puts "Hello"
|
50
|
+
end
|
51
|
+
<% end %>
|
52
|
+
"""
|
53
|
+
And the Server is running
|
54
|
+
When I go to "/index.html"
|
55
|
+
Then I should see '<pre class="highlight ruby helper-class another-helper-class"><code>'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Feature: Lexer options configuration
|
2
|
+
|
3
|
+
Scenario: Lexer options are passed to Rouge lexer
|
4
|
+
Given a fixture app "test-app"
|
5
|
+
And a file named "config.rb" with:
|
6
|
+
"""
|
7
|
+
activate :syntax, :lexer_options => { :prompt => 'myshell>>>' }
|
8
|
+
"""
|
9
|
+
And a file named "source/console_code.html.erb" with:
|
10
|
+
"""
|
11
|
+
<% code("console") do %>
|
12
|
+
myshell>>> echo "hello world"
|
13
|
+
myshell>>> echo "test"
|
14
|
+
<% end %>
|
15
|
+
"""
|
16
|
+
And the Server is running
|
17
|
+
When I go to "/console_code.html"
|
18
|
+
Then I should see '<span class="gp">myshell>>></span>'
|
19
|
+
And I should not see '<span class="o">>></span>'
|
data/features/support/env.rb
CHANGED
@@ -2,3 +2,13 @@
|
|
2
2
|
Then(/^I should not see line numbers markup$/) do
|
3
3
|
expect(page).not_to have_selector("pre.lineno")
|
4
4
|
end
|
5
|
+
|
6
|
+
# step definition for testing that specific content is not present
|
7
|
+
Then(/^I should not see "([^"]*)"$/) do |content|
|
8
|
+
expect(page.body).not_to include(content)
|
9
|
+
end
|
10
|
+
|
11
|
+
# step definition for testing that specific content is not present (new format)
|
12
|
+
Then('I should not see {string}') do |content|
|
13
|
+
expect(page.body).not_to include(content)
|
14
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
activate :syntax, :extra_css_classes => ["custom-class", "another-class"]
|
@@ -14,6 +14,7 @@ module Middleman
|
|
14
14
|
option :inline_theme, nil, 'A Rouge::CSSTheme that will be used to highlight the output with inline styles instead of using CSS classes.'
|
15
15
|
option :wrap, true, 'Wrap the highlighted content in a container (<pre> or <div>, depending on whether :line_numbers is on).'
|
16
16
|
option :lexer_options, {}, 'Options for the Rouge lexers.'
|
17
|
+
option :extra_css_classes, [], 'Additional CSS classes to add to the pre tag.'
|
17
18
|
|
18
19
|
def after_configuration
|
19
20
|
Middleman::Syntax::Highlighter.options = options
|
@@ -16,7 +16,16 @@ module Middleman
|
|
16
16
|
@formatter = Rouge::Formatters::HTMLLinewise.new(@formatter, class:'line-%i') if opts[:line_numbers_div]
|
17
17
|
|
18
18
|
if opts.fetch(:wrap, true)
|
19
|
-
|
19
|
+
css_class = opts.fetch(:css_class, 'codehilite')
|
20
|
+
|
21
|
+
# Add custom classes to the pre element
|
22
|
+
if opts[:extra_css_classes] && !opts[:extra_css_classes].empty?
|
23
|
+
extra_css_classes = opts[:extra_css_classes].is_a?(Array) ? opts[:extra_css_classes] : opts[:extra_css_classes].to_s.split
|
24
|
+
# Include the custom classes in the css_class parameter
|
25
|
+
css_class = [css_class].concat(extra_css_classes).join(' ')
|
26
|
+
end
|
27
|
+
|
28
|
+
@formatter = Rouge::Formatters::HTMLPygments.new(@formatter, css_class)
|
20
29
|
end
|
21
30
|
end
|
22
31
|
|
@@ -7,14 +7,15 @@ module Middleman
|
|
7
7
|
|
8
8
|
# A helper module for highlighting code
|
9
9
|
def self.highlight(code, language=nil, opts={})
|
10
|
-
lexer = Rouge::Lexer.find_fancy(language, code) || Rouge::Lexers::PlainText
|
11
|
-
|
12
10
|
highlighter_options = options.to_h.merge(opts)
|
13
|
-
highlighter_options[:css_class] = [ highlighter_options[:css_class], lexer.tag ].join(' ')
|
14
11
|
lexer_options = highlighter_options.delete(:lexer_options)
|
12
|
+
|
13
|
+
lexer = Rouge::Lexer.find_fancy(language, code, lexer_options) || Rouge::Lexers::PlainText
|
14
|
+
|
15
|
+
highlighter_options[:css_class] = [ highlighter_options[:css_class], lexer.tag ].join(' ')
|
15
16
|
|
16
17
|
formatter = Middleman::Syntax::Formatters::HTML.new(highlighter_options)
|
17
|
-
formatter.format(lexer.lex(code
|
18
|
+
formatter.format(lexer.lex(code))
|
18
19
|
end
|
19
20
|
end
|
20
21
|
end
|
data/middleman-syntax.gemspec
CHANGED
@@ -12,12 +12,6 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.license = "MIT"
|
13
13
|
s.files = `git ls-files -z`.split("\0")
|
14
14
|
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
|
15
|
-
s.require_paths = ["lib"]
|
16
15
|
s.add_runtime_dependency("middleman-core", [">= 3.2"])
|
17
16
|
s.add_runtime_dependency("rouge", ["~> 3.2"])
|
18
|
-
s.add_development_dependency("aruba")
|
19
|
-
s.add_development_dependency("cucumber")
|
20
|
-
s.add_development_dependency("haml")
|
21
|
-
s.add_development_dependency("kramdown")
|
22
|
-
s.add_development_dependency("slim")
|
23
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-syntax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Hollis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -38,76 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.2'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: aruba
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: cucumber
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: haml
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: kramdown
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: slim
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
41
|
description: Code syntax highlighting plugin via rouge for Middleman
|
112
42
|
email:
|
113
43
|
- ben@benhollis.net
|
@@ -115,8 +45,6 @@ executables: []
|
|
115
45
|
extensions: []
|
116
46
|
extra_rdoc_files: []
|
117
47
|
files:
|
118
|
-
- ".devcontainer/Dockerfile"
|
119
|
-
- ".devcontainer/devcontainer.json"
|
120
48
|
- ".github/workflows/ci.yml"
|
121
49
|
- ".gitignore"
|
122
50
|
- CHANGELOG.md
|
@@ -125,13 +53,17 @@ files:
|
|
125
53
|
- LICENSE.md
|
126
54
|
- README.md
|
127
55
|
- Rakefile
|
56
|
+
- features/extra_css_classes.feature
|
128
57
|
- features/haml_filter.feature
|
129
58
|
- features/helper.feature
|
59
|
+
- features/lexer_options.feature
|
130
60
|
- features/markdown.feature
|
131
61
|
- features/markdown_line_numbers_disabled.feature
|
132
62
|
- features/markdown_line_numbers_enabled.feature
|
133
63
|
- features/support/env.rb
|
134
64
|
- features/support/step_definitions.rb
|
65
|
+
- fixtures/test-app-extra-css-classes/config.rb
|
66
|
+
- fixtures/test-app-extra-css-classes/source/index.html.erb
|
135
67
|
- fixtures/test-app/config.rb
|
136
68
|
- fixtures/test-app/source/code.html.markdown
|
137
69
|
- fixtures/test-app/source/code_haml.html.haml
|
@@ -169,18 +101,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
101
|
- !ruby/object:Gem::Version
|
170
102
|
version: '0'
|
171
103
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
104
|
+
rubygems_version: 3.5.16
|
173
105
|
signing_key:
|
174
106
|
specification_version: 4
|
175
107
|
summary: Code syntax highlighting plugin via rouge for Middleman
|
176
108
|
test_files:
|
109
|
+
- features/extra_css_classes.feature
|
177
110
|
- features/haml_filter.feature
|
178
111
|
- features/helper.feature
|
112
|
+
- features/lexer_options.feature
|
179
113
|
- features/markdown.feature
|
180
114
|
- features/markdown_line_numbers_disabled.feature
|
181
115
|
- features/markdown_line_numbers_enabled.feature
|
182
116
|
- features/support/env.rb
|
183
117
|
- features/support/step_definitions.rb
|
118
|
+
- fixtures/test-app-extra-css-classes/config.rb
|
119
|
+
- fixtures/test-app-extra-css-classes/source/index.html.erb
|
184
120
|
- fixtures/test-app/config.rb
|
185
121
|
- fixtures/test-app/source/code.html.markdown
|
186
122
|
- fixtures/test-app/source/code_haml.html.haml
|
data/.devcontainer/Dockerfile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/ruby/.devcontainer/base.Dockerfile
|
2
|
-
|
3
|
-
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster
|
4
|
-
ARG VARIANT="3.1-bullseye"
|
5
|
-
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
|
6
|
-
|
7
|
-
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
8
|
-
ARG NODE_VERSION="none"
|
9
|
-
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
10
|
-
|
11
|
-
# [Optional] Uncomment this section to install additional OS packages.
|
12
|
-
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
13
|
-
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
14
|
-
|
15
|
-
# [Optional] Uncomment this line to install additional gems.
|
16
|
-
# RUN gem install <your-gem-names-here>
|
17
|
-
|
18
|
-
# [Optional] Uncomment this line to install global node packages.
|
19
|
-
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
@@ -1,37 +0,0 @@
|
|
1
|
-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
2
|
-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/ruby
|
3
|
-
{
|
4
|
-
"name": "Ruby",
|
5
|
-
"build": {
|
6
|
-
"dockerfile": "Dockerfile",
|
7
|
-
"args": {
|
8
|
-
// Update 'VARIANT' to pick a Ruby version: 3, 3.1, 3.0, 2, 2.7
|
9
|
-
// Append -bullseye or -buster to pin to an OS version.
|
10
|
-
// Use -bullseye variants on local on arm64/Apple Silicon.
|
11
|
-
"VARIANT": "2.7",
|
12
|
-
// Options
|
13
|
-
"NODE_VERSION": "lts/*"
|
14
|
-
}
|
15
|
-
},
|
16
|
-
|
17
|
-
// Configure tool-specific properties.
|
18
|
-
"customizations": {
|
19
|
-
// Configure properties specific to VS Code.
|
20
|
-
"vscode": {
|
21
|
-
// Add the IDs of extensions you want installed when the container is created.
|
22
|
-
"extensions": [
|
23
|
-
"rebornix.Ruby"
|
24
|
-
]
|
25
|
-
}
|
26
|
-
},
|
27
|
-
|
28
|
-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
29
|
-
// "forwardPorts": [],
|
30
|
-
|
31
|
-
// Use 'postCreateCommand' to run commands after the container is created.
|
32
|
-
// "postCreateCommand": "ruby --version",
|
33
|
-
|
34
|
-
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
35
|
-
"remoteUser": "vscode"
|
36
|
-
|
37
|
-
}
|