jekyll_pre 1.1.6 → 1.2.1

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
  SHA256:
3
- metadata.gz: 342dc6a4bc2860320f78fa197b5c8543ce387f6a4ab848133bdedae1cb3b12a9
4
- data.tar.gz: 06bb60d730294296d468e0191e77fb0679427f35ec635121fa0c45d112ced8c9
3
+ metadata.gz: c319e1e24db16309a2df595cd44df695cd239eba0c477af076a12fc25033e292
4
+ data.tar.gz: edddecc3b1265d3741d4c7a5eac9cf6980f305541fa003f14f67d7a0165c3766
5
5
  SHA512:
6
- metadata.gz: 5c0b0e9cd0a3d24e8f33834554e9ad5c306e8a679c230b0d2419fef758d329b17fed575bd02d68b8a146caf43b1709797252d123b9778deb7546d098a078d43b
7
- data.tar.gz: 5e3bdd70cbe31a57330cf8e820965f2f13382e378cbd612a890a08c67cf3ea2222fe01630caf58ec9bc6612e5421b7e03483d9417a56655bb2cf815477a6dff1
6
+ metadata.gz: 6cef3e92951e7d2f53107a8ade5dd04d52b8bc505fd4112bb0689a8bf7a245b6088c3e56238a211a73362c1ff6cf978ff3646ed289b667533e2495838f7127e4
7
+ data.tar.gz: c5b8067ee37fe465aa697acc30bdb8e6d54b85c020da4fa80d788f978a72d729745c9b3556caa563edbb358d770b95e0e07e6bf0addf23aad0818c0cf2e4b00d
data/CHANGELOG.md CHANGED
@@ -1,7 +1,15 @@
1
+ ## 1.2.1
2
+ * Updated to `jekyll_plugin_support` v0.5.1 so the `noselect` tag is more efficient.
3
+
4
+ ## 1.2.0
5
+ * Updated to `jekyll_plugin_support` v0.5.0.
6
+
7
+ ## 1.1.7
8
+ * Fixed `noselect` tag content handling.
9
+
1
10
  ## 1.1.6
2
11
  * Added `jekyll_plugin_support` as a dependency.
3
12
 
4
-
5
13
  ## 1.1.5
6
14
  * Added `class` and `style` options to allow for specifying additional CSS classes and inline CSS
7
15
  * Added `clear` option to ensure no images overlap the pre output
data/README.md CHANGED
@@ -11,20 +11,27 @@ This Jekyll plugin provides 2 new Liquid tags that work together:
11
11
  {% endpre %}
12
12
  ```
13
13
  `Options` are:
14
+ - `class="class1 class2"` – Apply CSS classes
14
15
  - `clear` – Line break after floating HTML elements
15
- - `class="class names"` – Apply CSS styles
16
16
  - `copyButton` – Generate a copy button
17
17
  - `dark` – Dark mode
18
- - `label='This is a label'` – Apply text above pre tag
18
+ - `label='This is a label'` – Apply text above `pre` tag.
19
+ The `label` parameter value can also be specified in free text.
20
+ For example, the following produce the same results:
21
+
22
+ - {% pre label="This is a label" %}<br>Contents of pre tag<br>{% endpre %}
23
+
24
+ - {% pre This is a label %}<br>Contents of pre tag<br>{% endpre %}
19
25
  - `number` &ndash; Number the lines
20
26
  - `shell` &ndash; Equivalent to `label='Shell'`
21
27
  - `style` &ndash; Apply CSS styles
22
28
 
23
29
  The generated &lt;pre>&lt;/pre> tag has an `data-lt-active="false"` attribute, so [LanguageTool](https://forum.languagetool.org/t/avoid-spell-check-on-certain-html-inputs-manually/3944) does not check the spelling or grammar of the contents.
24
- * A `noselect` tag that can renders HTML content passed to it unselectable.
30
+ * A `noselect` tag that can renders HTML content passed to it unselectable,
31
+ and generates a <code>$</code> prompt if no content is provided.
25
32
  ```
26
- {% pre [copyButton] %}
27
- {% noselect [text string, defaults to $]%}Contents of pre tag
33
+ {% pre %}
34
+ {% noselect [optional text string, defaults to $]%}Contents of pre tag
28
35
  {% endpre %}
29
36
  ```
30
37
 
data/jekyll_pre.gemspec CHANGED
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
32
32
  spec.version = JekyllPreVersion::VERSION
33
33
 
34
34
  spec.add_dependency 'jekyll', '>= 3.5.0'
35
- spec.add_dependency 'jekyll_plugin_support', '~> 0.4.0'
35
+ spec.add_dependency 'jekyll_plugin_support', '~> 0.5.0'
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllPreVersion
2
- VERSION = '1.1.6'.freeze
2
+ VERSION = '1.2.1'.freeze
3
3
  end
data/lib/jekyll_pre.rb CHANGED
@@ -85,9 +85,10 @@ end
85
85
 
86
86
  # """\\{% noselect %} or \\{% noselect this all gets copied.
87
87
  # Also, space before the closing percent is signficant %}"""
88
- class UnselectableTag < JekyllSupport::JekyllTag
88
+ class UnselectableTag < JekyllSupport::JekyllTagNoArgParsing
89
89
  def render_impl
90
- text = @helper.argv.join(' ').strip
90
+ text = @argument_string
91
+ text = '$ ' if text.nil? || text.empty?
91
92
  "<span class='unselectable'>#{text}</span>"
92
93
  end
93
94
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_pre
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-14 00:00:00.000000000 Z
11
+ date: 2023-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.4.0
33
+ version: 0.5.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.4.0
40
+ version: 0.5.0
41
41
  description: 'Jekyll tags pre and noselect, for HTML <pre/> tag, prompts and unselectable
42
42
  text. Can number lines.
43
43