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 +4 -4
- data/features/filter.feature +25 -0
- data/lib/jekyll/scholar.rb +1 -0
- data/lib/jekyll/scholar/defaults.rb +1 -1
- data/lib/jekyll/scholar/plugins/tiny.rb +13 -0
- data/lib/jekyll/scholar/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d847e99be12f0d86a09c4c311c611ec75bc6acfc9c87b6153d12459b7f9739fc
|
4
|
+
data.tar.gz: 7e6f5ccb6857f6b409625cc8dd295fa6c45ea886c8d32ceccfada77c4f58315e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af5f996147e731bdc6366b3c3fa57c80b14d4db68428e4ba96a06090b20c85b62fb82b7ab5d4bf28a7db8bf55ff06149eb75212ead0502c3b94dfc675b2376bc
|
7
|
+
data.tar.gz: 0eadd4d81469a5ea5d2056f30c16c811acf8f29f70b93550720956ef9423f93394fd058abbfd1138b89c2b8af323b7252fa199f1181dd7915b7943781213b9cc
|
data/features/filter.feature
CHANGED
@@ -584,3 +584,28 @@ Feature: BibTeX
|
|
584
584
|
And the "_site/scholar.html" file should exist
|
585
585
|
And I should see "This is ® 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
|
+
|
data/lib/jekyll/scholar.rb
CHANGED
@@ -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
|
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.
|
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-
|
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.
|
157
|
+
rubygems_version: 3.0.3
|
157
158
|
signing_key:
|
158
159
|
specification_version: 4
|
159
160
|
summary: Jekyll extensions for the academic blogger.
|