middleman-syntax 3.3.0 → 3.5.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 +25 -0
- data/CHANGELOG.md +27 -10
- data/Gemfile +12 -17
- data/README.md +41 -12
- data/Rakefile +4 -22
- data/features/extra_css_classes.feature +55 -0
- data/features/support/env.rb +0 -1
- 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/haml_monkey_patch.rb +33 -13
- data/lib/middleman-syntax/version.rb +1 -1
- data/middleman-syntax.gemspec +1 -10
- metadata +29 -94
- data/.devcontainer/Dockerfile +0 -19
- data/.devcontainer/devcontainer.json +0 -37
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c41f2663b48aae350425db1c725c5e879f8c2bf70eeee2daa85011a7975f99ba
|
4
|
+
data.tar.gz: c6e893e03faa6f466783e26fc95a44df915aa435c8c87ca7c83253b0ef44b0aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c812e2f320378a9b8e64344974e0277d0904f7834358b1878f93e5305f98bd2a3d7cc90b62bab720d2cfadea0d25ac27ef45709e4a1be58b9f4cae401d88338
|
7
|
+
data.tar.gz: b5e220fb0f0fee8c712779619e9cda036b2438e9f8bd571e9f65e24aad5e1bd10fe1f134db4e7140818cc574381d67d05a924171e7aaef5a8b5627cf54413a8e
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [master]
|
6
|
+
pull_request:
|
7
|
+
branches: [master]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
name: ubuntu-ruby-${{ matrix.ruby-version }}
|
13
|
+
strategy:
|
14
|
+
fail-fast: false
|
15
|
+
matrix:
|
16
|
+
ruby-version: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v4
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby-version }}
|
23
|
+
bundler-cache: true
|
24
|
+
- name: Runs tests
|
25
|
+
run: bundle exec rake test
|
data/CHANGELOG.md
CHANGED
@@ -1,19 +1,36 @@
|
|
1
|
-
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
# 3.5.0
|
6
|
+
|
7
|
+
- Remove official support for Ruby 2.5 and 2.6 (#89).
|
8
|
+
- Add ability to add other classes to the :syntax plugin (#90).
|
9
|
+
|
10
|
+
# 3.4.0
|
11
|
+
|
12
|
+
- Haml 6 support (#82, #84).
|
13
|
+
- Migrate CI from Travis to GitHub Actions (#83).
|
14
|
+
|
15
|
+
# 3.3.0
|
16
|
+
|
17
|
+
- Remove trailing blank lines from HAML's :code filter (#79).
|
18
|
+
- Allow for Linewise Rouge formatter (#78).
|
2
19
|
|
3
20
|
# 3.2.0
|
4
21
|
|
5
|
-
- Prep for Middleman v5
|
22
|
+
- Prep for Middleman v5.
|
6
23
|
|
7
24
|
# 3.0.0
|
8
25
|
|
9
|
-
- Upgrade to Rouge 2.0
|
10
|
-
- Added the ability to disable the line numbers on a specific code block when using Markdown and Redcarpet
|
26
|
+
- Upgrade to Rouge 2.0 (#66).
|
27
|
+
- Added the ability to disable the line numbers on a specific code block when using Markdown and Redcarpet (#63).
|
11
28
|
- Lexer options are properly passed down to the highlighter.
|
12
29
|
|
13
30
|
# 2.1.0
|
14
31
|
|
15
|
-
- Version compatibility with Middleman 4
|
16
|
-
- Allow passing Rouge formatter options from the `code` helper
|
32
|
+
- Version compatibility with Middleman 4 (#58).
|
33
|
+
- Allow passing Rouge formatter options from the `code` helper (#50).
|
17
34
|
- Fixed tests and code reorganization.
|
18
35
|
|
19
36
|
# 2.0.0
|
@@ -32,17 +49,17 @@
|
|
32
49
|
# 1.2.0
|
33
50
|
|
34
51
|
- Support Kramdown as Markdown engine in addition to Redcarpet.
|
35
|
-
- Switch to Rouge from Pygments.rb
|
52
|
+
- Switch to Rouge from Pygments.rb.
|
36
53
|
- Fix bugs around setting language options.
|
37
54
|
|
38
55
|
# 1.1.1
|
39
56
|
|
40
|
-
- Properly merge language attribute for Markdown
|
57
|
+
- Properly merge language attribute for Markdown (#14).
|
41
58
|
|
42
59
|
# 1.1.0
|
43
60
|
|
44
|
-
- Avoid errors when language is empty
|
45
|
-
- Allow passing options to Pygments
|
61
|
+
- Avoid errors when language is empty (#9).
|
62
|
+
- Allow passing options to Pygments (#5, #7).
|
46
63
|
|
47
64
|
# 1.0.1
|
48
65
|
|
data/Gemfile
CHANGED
@@ -1,27 +1,22 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem "middleman-core", :
|
3
|
+
gem "middleman-core", git: "https://github.com/middleman/middleman.git"
|
4
4
|
|
5
5
|
# Specify your gem's dependencies in middleman-syntax.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
8
|
# Build and doc tools
|
9
|
-
gem 'rake', '~>
|
10
|
-
gem 'yard', '~> 0.
|
9
|
+
gem 'rake', '~> 13.1', require: false
|
10
|
+
gem 'yard', '~> 0.9', require: false
|
11
11
|
|
12
12
|
# Test tools
|
13
|
-
gem '
|
14
|
-
gem '
|
15
|
-
gem '
|
16
|
-
gem 'cucumber', '~> 2.0'
|
17
|
-
gem 'capybara', '~> 2.5.0'
|
13
|
+
gem 'aruba'
|
14
|
+
gem 'cucumber'
|
15
|
+
gem 'capybara'
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
gem
|
25
|
-
|
26
|
-
# For old rubies
|
27
|
-
gem 'nokogiri', ['~> 1.5', '< 1.7']
|
17
|
+
# Optional dependencies, included for tests
|
18
|
+
gem 'haml', RUBY_VERSION > '3.0' ? '< 7' : '< 6'
|
19
|
+
gem 'slim'
|
20
|
+
gem 'kramdown'
|
21
|
+
gem 'redcarpet'
|
22
|
+
gem 'rack'
|
data/README.md
CHANGED
@@ -3,8 +3,7 @@
|
|
3
3
|
`middleman-syntax` is an extension for the [Middleman] static site generator that adds syntax highlighting via [Rouge](https://github.com/jayferd/rouge).
|
4
4
|
|
5
5
|
[][gem]
|
6
|
-
[][gemnasium]
|
6
|
+
[](https://github.com/middleman/middleman-syntax/actions/workflows/ci.yml)
|
8
7
|
[][codeclimate]
|
9
8
|
|
10
9
|
## Installation
|
@@ -16,9 +15,7 @@ gem install middleman
|
|
16
15
|
middleman init MY_PROJECT
|
17
16
|
```
|
18
17
|
|
19
|
-
If you already have a Middleman project
|
20
|
-
|
21
|
-
**This plugin will not work on Ruby 1.8!** Rouge requires 1.9+, so we do too.
|
18
|
+
If you already have a Middleman project, add `gem "middleman-syntax"` to your `Gemfile` and run `bundle install`.
|
22
19
|
|
23
20
|
## Configuration
|
24
21
|
|
@@ -32,6 +29,18 @@ You can also pass options to Rouge:
|
|
32
29
|
activate :syntax, :line_numbers => true
|
33
30
|
```
|
34
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
|
+
|
35
44
|
The full set of options can be seen on your preview server's `/__middleman/config/` page.
|
36
45
|
|
37
46
|
## Helper
|
@@ -73,6 +82,7 @@ The `code` helper supports [Rouge](https://github.com/jayferd/rouge) instance fo
|
|
73
82
|
* `start_line`
|
74
83
|
* `css_class`
|
75
84
|
* `wrap`
|
85
|
+
* `extra_css_classes`
|
76
86
|
|
77
87
|
To use these formatter options per code block, include them in a hash as the second argument. e.g.
|
78
88
|
|
@@ -84,19 +94,40 @@ end
|
|
84
94
|
<% end %>
|
85
95
|
```
|
86
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
|
+
```html
|
109
|
+
<div class="highlight"><pre class="highlight ruby custom-class special"><code>...</code></pre></div>
|
110
|
+
```
|
111
|
+
|
87
112
|
## CSS
|
88
113
|
|
89
114
|
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.
|
90
115
|
|
91
|
-
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:
|
116
|
+
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:
|
92
117
|
|
93
118
|
```erb
|
94
119
|
<%= Rouge::Themes::ThankfulEyes.render(:scope => '.highlight') %>
|
95
120
|
```
|
96
121
|
|
97
|
-
|
122
|
+
And then include it in your layout or specific page by:
|
123
|
+
|
124
|
+
```erb
|
125
|
+
<%= stylesheet_link_tag "highlighting" %>
|
126
|
+
```
|
127
|
+
|
128
|
+
If you want to include this in a larger Sass stylesheet, include it in your main stylesheet with `@import 'highlighting.css'`).
|
98
129
|
|
99
|
-
Rouge has `ThankfulEyes`, `Colorful`, `Github`, `Base16`, `Base16::Solarized
|
130
|
+
Rouge has `ThankfulEyes`, `Colorful`, `Github`, `Base16`, `Base16::Solarized`, `Base16::Monokai`, and `Monokai` themes.
|
100
131
|
|
101
132
|
## Markdown
|
102
133
|
|
@@ -111,7 +142,7 @@ set :markdown, :fenced_code_blocks => true, :smartypants => true
|
|
111
142
|
set :markdown_engine, :kramdown
|
112
143
|
```
|
113
144
|
|
114
|
-
Now your Markdown will work just like it does [on GitHub](
|
145
|
+
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:
|
115
146
|
|
116
147
|
<pre>
|
117
148
|
```ruby
|
@@ -197,7 +228,7 @@ The best way to get quick responses to your issues and swift fixes to your bugs
|
|
197
228
|
|
198
229
|
## Donate
|
199
230
|
|
200
|
-
[Click here to lend your support to Middleman](https://
|
231
|
+
[Click here to lend your support to Middleman](https://github.com/sponsors/tdreyno)
|
201
232
|
|
202
233
|
## License
|
203
234
|
|
@@ -205,7 +236,5 @@ Copyright (c) 2012-2014 Benjamin Hollis. MIT Licensed, see [LICENSE] for details
|
|
205
236
|
|
206
237
|
[middleman]: http://middlemanapp.com
|
207
238
|
[gem]: https://rubygems.org/gems/middleman-syntax
|
208
|
-
[travis]: http://travis-ci.org/middleman/middleman-syntax
|
209
|
-
[gemnasium]: https://gemnasium.com/middleman/middleman-syntax
|
210
239
|
[codeclimate]: https://codeclimate.com/github/middleman/middleman-syntax
|
211
240
|
[LICENSE]: https://github.com/middleman/middleman-syntax/blob/master/LICENSE.md
|
data/Rakefile
CHANGED
@@ -1,31 +1,13 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
Bundler::GemHelper.install_tasks
|
3
|
-
|
1
|
+
require 'bundler/gem_tasks'
|
4
2
|
require 'cucumber/rake/task'
|
5
3
|
|
6
4
|
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
|
7
|
-
exempt_tags = ""
|
8
|
-
exempt_tags << "--tags
|
9
|
-
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'}"
|
10
8
|
end
|
11
9
|
|
12
|
-
require 'rake/clean'
|
13
|
-
|
14
10
|
task :test => ["cucumber"]
|
15
|
-
|
16
|
-
begin
|
17
|
-
require 'cane/rake_task'
|
18
|
-
|
19
|
-
desc "Run cane to check quality metrics"
|
20
|
-
Cane::RakeTask.new(:quality) do |cane|
|
21
|
-
cane.no_style = true
|
22
|
-
cane.no_doc = true
|
23
|
-
cane.abc_glob = "lib/middleman-syntax/**/*.rb"
|
24
|
-
end
|
25
|
-
rescue LoadError
|
26
|
-
# warn "cane not available, quality task not provided."
|
27
|
-
end
|
28
|
-
|
29
11
|
task :default => :test
|
30
12
|
|
31
13
|
desc "Build HTML documentation"
|
@@ -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>'
|
data/features/support/env.rb
CHANGED
@@ -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
|
|
@@ -1,22 +1,42 @@
|
|
1
1
|
# If Haml is around, define a :code filter that can be used to more conveniently output highlighted code.
|
2
|
+
|
2
3
|
if defined? Haml
|
3
|
-
module
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
module HamlMonkeyPatch
|
5
|
+
def render(code)
|
6
|
+
code = code.rstrip
|
7
|
+
code = code.encode(Encoding::UTF_8)
|
8
|
+
|
9
|
+
# Allow language to be specified via a special comment like:
|
10
|
+
# # lang: ruby
|
11
|
+
if code.lines.first =~ /\A\s*#\s*lang:\s*(\w+)$/
|
12
|
+
language = $1
|
13
|
+
code = code.lines.to_a[1..-1].join # Strip first line
|
14
|
+
end
|
7
15
|
|
8
|
-
|
9
|
-
|
10
|
-
|
16
|
+
Middleman::Syntax::Highlighter.highlight(code, language)
|
17
|
+
end
|
18
|
+
end
|
11
19
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
20
|
+
if Gem::Version.new(Haml::VERSION) >= Gem::Version.new("6.0.0")
|
21
|
+
module Haml
|
22
|
+
class Filters
|
23
|
+
class Code < Base
|
24
|
+
include HamlMonkeyPatch
|
25
|
+
|
26
|
+
def compile(node)
|
27
|
+
[:static, render(node.value[:text])]
|
17
28
|
end
|
29
|
+
end
|
18
30
|
|
19
|
-
|
31
|
+
register :code, Code
|
32
|
+
end
|
33
|
+
end
|
34
|
+
else
|
35
|
+
module Haml
|
36
|
+
module Filters
|
37
|
+
module Code
|
38
|
+
include Base
|
39
|
+
extend HamlMonkeyPatch
|
20
40
|
end
|
21
41
|
end
|
22
42
|
end
|
data/middleman-syntax.gemspec
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "middleman-syntax/version"
|
1
|
+
require "./lib/middleman-syntax/version"
|
4
2
|
|
5
3
|
Gem::Specification.new do |s|
|
6
4
|
s.name = "middleman-syntax"
|
@@ -14,13 +12,6 @@ Gem::Specification.new do |s|
|
|
14
12
|
s.license = "MIT"
|
15
13
|
s.files = `git ls-files -z`.split("\0")
|
16
14
|
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
|
17
|
-
s.require_paths = ["lib"]
|
18
15
|
s.add_runtime_dependency("middleman-core", [">= 3.2"])
|
19
16
|
s.add_runtime_dependency("rouge", ["~> 3.2"])
|
20
|
-
s.add_development_dependency("aruba", "~> 0.5.1")
|
21
|
-
s.add_development_dependency("cucumber", "~> 1.3.1")
|
22
|
-
s.add_development_dependency("fivemat")
|
23
|
-
s.add_development_dependency("haml")
|
24
|
-
s.add_development_dependency("kramdown")
|
25
|
-
s.add_development_dependency("slim")
|
26
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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Hollis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -38,90 +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.5.1
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.5.1
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: cucumber
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 1.3.1
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 1.3.1
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: fivemat
|
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: haml
|
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: kramdown
|
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
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: slim
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
41
|
description: Code syntax highlighting plugin via rouge for Middleman
|
126
42
|
email:
|
127
43
|
- ben@benhollis.net
|
@@ -129,16 +45,15 @@ executables: []
|
|
129
45
|
extensions: []
|
130
46
|
extra_rdoc_files: []
|
131
47
|
files:
|
132
|
-
- ".
|
133
|
-
- ".devcontainer/devcontainer.json"
|
48
|
+
- ".github/workflows/ci.yml"
|
134
49
|
- ".gitignore"
|
135
|
-
- ".travis.yml"
|
136
50
|
- CHANGELOG.md
|
137
51
|
- CONTRIBUTING.md
|
138
52
|
- Gemfile
|
139
53
|
- LICENSE.md
|
140
54
|
- README.md
|
141
55
|
- Rakefile
|
56
|
+
- features/extra_css_classes.feature
|
142
57
|
- features/haml_filter.feature
|
143
58
|
- features/helper.feature
|
144
59
|
- features/markdown.feature
|
@@ -146,6 +61,8 @@ files:
|
|
146
61
|
- features/markdown_line_numbers_enabled.feature
|
147
62
|
- features/support/env.rb
|
148
63
|
- features/support/step_definitions.rb
|
64
|
+
- fixtures/test-app-extra-css-classes/config.rb
|
65
|
+
- fixtures/test-app-extra-css-classes/source/index.html.erb
|
149
66
|
- fixtures/test-app/config.rb
|
150
67
|
- fixtures/test-app/source/code.html.markdown
|
151
68
|
- fixtures/test-app/source/code_haml.html.haml
|
@@ -168,7 +85,7 @@ homepage: https://github.com/middleman/middleman-syntax
|
|
168
85
|
licenses:
|
169
86
|
- MIT
|
170
87
|
metadata: {}
|
171
|
-
post_install_message:
|
88
|
+
post_install_message:
|
172
89
|
rdoc_options: []
|
173
90
|
require_paths:
|
174
91
|
- lib
|
@@ -183,8 +100,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
100
|
- !ruby/object:Gem::Version
|
184
101
|
version: '0'
|
185
102
|
requirements: []
|
186
|
-
rubygems_version: 3.
|
187
|
-
signing_key:
|
103
|
+
rubygems_version: 3.4.10
|
104
|
+
signing_key:
|
188
105
|
specification_version: 4
|
189
106
|
summary: Code syntax highlighting plugin via rouge for Middleman
|
190
|
-
test_files:
|
107
|
+
test_files:
|
108
|
+
- features/extra_css_classes.feature
|
109
|
+
- features/haml_filter.feature
|
110
|
+
- features/helper.feature
|
111
|
+
- features/markdown.feature
|
112
|
+
- features/markdown_line_numbers_disabled.feature
|
113
|
+
- features/markdown_line_numbers_enabled.feature
|
114
|
+
- features/support/env.rb
|
115
|
+
- features/support/step_definitions.rb
|
116
|
+
- fixtures/test-app-extra-css-classes/config.rb
|
117
|
+
- fixtures/test-app-extra-css-classes/source/index.html.erb
|
118
|
+
- fixtures/test-app/config.rb
|
119
|
+
- fixtures/test-app/source/code.html.markdown
|
120
|
+
- fixtures/test-app/source/code_haml.html.haml
|
121
|
+
- fixtures/test-app/source/code_haml_filter.html.haml
|
122
|
+
- fixtures/test-app/source/code_html.html.erb
|
123
|
+
- fixtures/test-app/source/code_slim.html.slim
|
124
|
+
- fixtures/test-app/source/code_with_disabled_line_numbers.html.markdown
|
125
|
+
- fixtures/test-app/source/code_with_enabled_line_numbers.html.markdown
|
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
|
-
}
|