Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
caesr-pub
jekyll-scholar
Commits
be2f8090
Commit
be2f8090
authored
Apr 19, 2014
by
Sylvester Keil
Browse files
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