jekyll-scholar 6.0.0 → 6.1.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/features/186.feature +6 -3
- data/features/filter.feature +76 -0
- data/lib/jekyll/scholar.rb +3 -0
- data/lib/jekyll/scholar/defaults.rb +1 -1
- data/lib/jekyll/scholar/plugins/lowercase.rb +13 -0
- data/lib/jekyll/scholar/plugins/textit.rb +13 -0
- data/lib/jekyll/scholar/plugins/textregistered.rb +13 -0
- data/lib/jekyll/scholar/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0faa17cc46745d1aafa8b2ca82cc1fc0be124d3be611dac7d4207c09c5ce73f
|
4
|
+
data.tar.gz: 4b0b994ca1afa03a67d1653191ba8cf3817192da4a63b7197539ea09753e4c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fda84705218915ae8e12095dc9f4f01459627ab4025100a59f46ff2e6057698472e87321ecfaf38b18a03873e54af9b95cabc0efa5df18eac9f0f69d80936380
|
7
|
+
data.tar.gz: 959a16838a7be73d8b78764f5894578e702ed405825abaa5179e1553a0d77d01380856c2de206c3318540238965a7712a8f731f9cfc58796fef02e01673c3ec5
|
data/features/186.feature
CHANGED
@@ -89,19 +89,22 @@ Feature: BibTeX
|
|
89
89
|
title = {Smalltalk Best Practice Patterns},
|
90
90
|
author = {Kent Beck},
|
91
91
|
year = {1996},
|
92
|
-
publisher = {Prentice Hall}
|
92
|
+
publisher = {Prentice Hall},
|
93
|
+
public = {yes}
|
93
94
|
}
|
94
95
|
@book{ruby,
|
95
96
|
title = {The Ruby Programming Language v1},
|
96
97
|
author = {Flanagan, David and Matsumoto, Yukihiro},
|
97
98
|
year = {1998},
|
98
|
-
publisher = {O'Reilly Media}
|
99
|
+
publisher = {O'Reilly Media},
|
100
|
+
public = {yes}
|
99
101
|
}
|
100
102
|
@book{ruby2,
|
101
103
|
title = {The Ruby Programming Language v2},
|
102
104
|
author = {Flanagan, David and Matsumoto, Yukihiro},
|
103
105
|
year = {2008},
|
104
|
-
publisher = {O'Reilly Media}
|
106
|
+
publisher = {O'Reilly Media},
|
107
|
+
public = {no}
|
105
108
|
}
|
106
109
|
"""
|
107
110
|
And I have a page "scholar.html":
|
data/features/filter.feature
CHANGED
@@ -508,3 +508,79 @@ Feature: BibTeX
|
|
508
508
|
And the "_site/scholar.html" file should exist
|
509
509
|
And I should see "This is <i>italics</i>." in "_site/scholar.html"
|
510
510
|
|
511
|
+
|
512
|
+
@tags @italics @textit
|
513
|
+
Scenario: LaTeX textit as HTML italics
|
514
|
+
Given I have a scholar configuration with:
|
515
|
+
| key | value |
|
516
|
+
| source | ./_bibliography |
|
517
|
+
And I have the following BibTeX filters:
|
518
|
+
| textit |
|
519
|
+
And I have a "_bibliography" directory
|
520
|
+
And I have a file "_bibliography/references.bib":
|
521
|
+
"""
|
522
|
+
@misc{pickaxe,
|
523
|
+
title = {This is \textit{italics}.}
|
524
|
+
}
|
525
|
+
"""
|
526
|
+
And I have a page "scholar.html":
|
527
|
+
"""
|
528
|
+
---
|
529
|
+
---
|
530
|
+
{% bibliography %}
|
531
|
+
"""
|
532
|
+
When I run jekyll
|
533
|
+
Then the _site directory should exist
|
534
|
+
And the "_site/scholar.html" file should exist
|
535
|
+
And I should see "This is <i>italics</i>." in "_site/scholar.html"
|
536
|
+
|
537
|
+
@tags @lowercase
|
538
|
+
Scenario: LaTeX lowercase as lowercase
|
539
|
+
Given I have a scholar configuration with:
|
540
|
+
| key | value |
|
541
|
+
| source | ./_bibliography |
|
542
|
+
And I have the following BibTeX filters:
|
543
|
+
| lowercase |
|
544
|
+
And I have a "_bibliography" directory
|
545
|
+
And I have a file "_bibliography/references.bib":
|
546
|
+
"""
|
547
|
+
@misc{pickaxe,
|
548
|
+
title = {This is \lowercase{LOWERTHIS}.}
|
549
|
+
}
|
550
|
+
"""
|
551
|
+
And I have a page "scholar.html":
|
552
|
+
"""
|
553
|
+
---
|
554
|
+
---
|
555
|
+
{% bibliography %}
|
556
|
+
"""
|
557
|
+
When I run jekyll
|
558
|
+
Then the _site directory should exist
|
559
|
+
And the "_site/scholar.html" file should exist
|
560
|
+
And I should see "This is lowerthis." in "_site/scholar.html"
|
561
|
+
|
562
|
+
@tags @textregistered
|
563
|
+
Scenario: LaTeX textregistered as HTML registered symbol
|
564
|
+
Given I have a scholar configuration with:
|
565
|
+
| key | value |
|
566
|
+
| source | ./_bibliography |
|
567
|
+
And I have the following BibTeX filters:
|
568
|
+
| textregistered |
|
569
|
+
And I have a "_bibliography" directory
|
570
|
+
And I have a file "_bibliography/references.bib":
|
571
|
+
"""
|
572
|
+
@misc{pickaxe,
|
573
|
+
title = {This is \textregistered to me.}
|
574
|
+
}
|
575
|
+
"""
|
576
|
+
And I have a page "scholar.html":
|
577
|
+
"""
|
578
|
+
---
|
579
|
+
---
|
580
|
+
{% bibliography %}
|
581
|
+
"""
|
582
|
+
When I run jekyll
|
583
|
+
Then the _site directory should exist
|
584
|
+
And the "_site/scholar.html" file should exist
|
585
|
+
And I should see "This is ® to me." in "_site/scholar.html"
|
586
|
+
|
data/lib/jekyll/scholar.rb
CHANGED
@@ -25,3 +25,6 @@ require 'jekyll/scholar/plugins/markdown_links'
|
|
25
25
|
require 'jekyll/scholar/plugins/superscript'
|
26
26
|
require 'jekyll/scholar/plugins/smallcaps'
|
27
27
|
require 'jekyll/scholar/plugins/italics'
|
28
|
+
require 'jekyll/scholar/plugins/textit'
|
29
|
+
require 'jekyll/scholar/plugins/lowercase'
|
30
|
+
require 'jekyll/scholar/plugins/textregistered'
|
@@ -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, :latex ],
|
39
|
+
'bibtex_filters' => [ :smallcaps, :superscript, :italics, :textit, :lowercase, :textregistered, :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 Lowercase < 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(/\\lowercase(\{(?:[^{}]|\g<1>)*\})/) {
|
8
|
+
"#{$1[1..-2].downcase}"
|
9
|
+
}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Jekyll
|
2
|
+
class Scholar
|
3
|
+
class Textit < 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(/\\textit(\{(?:[^{}]|\g<1>)*\})/) {
|
8
|
+
"<i>#{$1[1..-2]}</i>"
|
9
|
+
}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Jekyll
|
2
|
+
class Scholar
|
3
|
+
class Textregistered < 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(/\\textregistered/) {
|
8
|
+
"®"
|
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.1.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-08-
|
11
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -118,9 +118,12 @@ files:
|
|
118
118
|
- lib/jekyll/scholar/defaults.rb
|
119
119
|
- lib/jekyll/scholar/generators/details.rb
|
120
120
|
- lib/jekyll/scholar/plugins/italics.rb
|
121
|
+
- lib/jekyll/scholar/plugins/lowercase.rb
|
121
122
|
- lib/jekyll/scholar/plugins/markdown_links.rb
|
122
123
|
- lib/jekyll/scholar/plugins/smallcaps.rb
|
123
124
|
- lib/jekyll/scholar/plugins/superscript.rb
|
125
|
+
- lib/jekyll/scholar/plugins/textit.rb
|
126
|
+
- lib/jekyll/scholar/plugins/textregistered.rb
|
124
127
|
- lib/jekyll/scholar/tags/bibliography.rb
|
125
128
|
- lib/jekyll/scholar/tags/bibliography_count.rb
|
126
129
|
- lib/jekyll/scholar/tags/bibtex.rb
|