Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
J
jekyll-scholar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
caesr-pub
jekyll-scholar
Commits
be2f8090
Commit
be2f8090
authored
Apr 19, 2014
by
Sylvester Keil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better solution for #44
parent
94a2630f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
features/step_definitions/scholar_steps.rb
features/step_definitions/scholar_steps.rb
+0
-1
lib/jekyll/scholar/tags/bibliography.rb
lib/jekyll/scholar/tags/bibliography.rb
+3
-7
No files found.
features/step_definitions/scholar_steps.rb
View file @
be2f8090
...
...
@@ -31,7 +31,6 @@ end
Then
(
/^"(.*)" should come before "(.*)" in "(.*)"$/
)
do
|
p1
,
p2
,
file
|
data
=
File
.
open
(
file
).
readlines
.
join
(
''
)
puts
data
m1
=
data
.
match
(
p1
)
m2
=
data
.
match
(
p2
)
...
...
lib/jekyll/scholar/tags/bibliography.rb
View file @
be2f8090
...
...
@@ -17,13 +17,9 @@ module Jekyll
references
=
entries
if
cited_only?
references
=
cited_references
.
uniq
.
map
do
|
key
|
references
.
detect
{
|
e
|
e
.
key
==
key
}
end
references
=
sort
references
end
references
.
select!
do
|
e
|
cited_references
.
include?
e
.
key
end
if
cited_only?
bibliography
=
references
.
each_with_index
.
map
{
|
entry
,
index
|
reference
=
bibliography_tag
(
entry
,
index
+
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment