jekyll-scholar 6.2.0 → 6.3.0

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: 851a94e35cec0f98f3242345376008c32ce4d842733291176b0c1aec9839b9a5
4
- data.tar.gz: 790bdcb509be73f07ad33cf05af48e7d5a66aaeba25910f5d2fbbd09d9066bff
3
+ metadata.gz: d847e99be12f0d86a09c4c311c611ec75bc6acfc9c87b6153d12459b7f9739fc
4
+ data.tar.gz: 7e6f5ccb6857f6b409625cc8dd295fa6c45ea886c8d32ceccfada77c4f58315e
5
5
  SHA512:
6
- metadata.gz: 7e186f78e25cab5dedf1e9dcba3a455b7bdb6701077517e0770f007972d6ab22d6850c44e205c6f761ce32cfa2e68463494c53b3b617592517afdde8234117f5
7
- data.tar.gz: 20b8a68f6fa78640dd3bcf4cedc5a730f4c93deefa2432445895cd4c88495c248007c4806a66696d9bfe6d8295583783f28ade1b5ddd5cc558ec93a8ba3f1f1d
6
+ metadata.gz: af5f996147e731bdc6366b3c3fa57c80b14d4db68428e4ba96a06090b20c85b62fb82b7ab5d4bf28a7db8bf55ff06149eb75212ead0502c3b94dfc675b2376bc
7
+ data.tar.gz: 0eadd4d81469a5ea5d2056f30c16c811acf8f29f70b93550720956ef9423f93394fd058abbfd1138b89c2b8af323b7252fa199f1181dd7915b7943781213b9cc
@@ -584,3 +584,28 @@ Feature: BibTeX
584
584
  And the "_site/scholar.html" file should exist
585
585
  And I should see "This is &#0174 to me." in "_site/scholar.html"
586
586
 
587
+ @tags @tiny
588
+ Scenario: LaTeX tiny as HTML registered symbol
589
+ Given I have a scholar configuration with:
590
+ | key | value |
591
+ | source | ./_bibliography |
592
+ And I have the following BibTeX filters:
593
+ | tiny |
594
+ And I have a "_bibliography" directory
595
+ And I have a file "_bibliography/references.bib":
596
+ """
597
+ @misc{pickaxe,
598
+ title = {This is \tiny{i is tiny} to me.}
599
+ }
600
+ """
601
+ And I have a page "scholar.html":
602
+ """
603
+ ---
604
+ ---
605
+ {% bibliography %}
606
+ """
607
+ When I run jekyll
608
+ Then the _site directory should exist
609
+ And the "_site/scholar.html" file should exist
610
+ And I should see "This is <span class="tiny">i is tiny</span> to me." in "_site/scholar.html"
611
+
@@ -28,3 +28,4 @@ require 'jekyll/scholar/plugins/italics'
28
28
  require 'jekyll/scholar/plugins/textit'
29
29
  require 'jekyll/scholar/plugins/lowercase'
30
30
  require 'jekyll/scholar/plugins/textregistered'
31
+ require 'jekyll/scholar/plugins/tiny'
@@ -36,7 +36,7 @@ module Jekyll
36
36
  'repository_file_delimiter' => '.',
37
37
 
38
38
  'bibtex_options' => { :strip => false, :parse_months => true },
39
- 'bibtex_filters' => [ :smallcaps, :superscript, :italics, :textit, :lowercase, :textregistered, :latex ],
39
+ 'bibtex_filters' => [ :smallcaps, :superscript, :italics, :textit, :lowercase, :textregistered, :tiny, :latex ],
40
40
  'bibtex_skip_fields' => [ :abstract, :month_numeric ],
41
41
  'bibtex_quotes' => ['{', '}'],
42
42
 
@@ -0,0 +1,13 @@
1
+ module Jekyll
2
+ class Scholar
3
+ class Tiny < BibTeX::Filter
4
+ def apply(value)
5
+ # Use of \g<1> pattern back-reference to allow for capturing nested {} groups.
6
+ # The first (outermost) capture of $1 is used.
7
+ value.to_s.gsub(/\\tiny(\{(?:[^{}]|\g<1>)*\})/) {
8
+ "<span class=\"tiny\">#{$1[1..-2]}</span>"
9
+ }
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '6.2.0'.freeze
3
+ VERSION = '6.3.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-scholar
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-02 00:00:00.000000000 Z
11
+ date: 2019-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -125,6 +125,7 @@ files:
125
125
  - lib/jekyll/scholar/plugins/superscript.rb
126
126
  - lib/jekyll/scholar/plugins/textit.rb
127
127
  - lib/jekyll/scholar/plugins/textregistered.rb
128
+ - lib/jekyll/scholar/plugins/tiny.rb
128
129
  - lib/jekyll/scholar/tags/bibliography.rb
129
130
  - lib/jekyll/scholar/tags/bibliography_count.rb
130
131
  - lib/jekyll/scholar/tags/bibtex.rb
@@ -153,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
154
  - !ruby/object:Gem::Version
154
155
  version: 1.3.6
155
156
  requirements: []
156
- rubygems_version: 3.0.6
157
+ rubygems_version: 3.0.3
157
158
  signing_key:
158
159
  specification_version: 4
159
160
  summary: Jekyll extensions for the academic blogger.