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
86f7aee6
Commit
86f7aee6
authored
May 23, 2014
by
Sylvester Keil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
de-reference key variables every time
parent
bec4038a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
features/citation.feature
features/citation.feature
+1
-1
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+8
-7
No files found.
features/citation.feature
View file @
86f7aee6
...
...
@@ -278,7 +278,7 @@ Feature: Citations
And
the
"_site/scholar.html"
file should exist
And
I should see
"Flanagan"
in
"_site/scholar.html"
@tags
@cite
@variables
@data
@tags
@cite
@variables
@data
@wip
Scenario
:
Multiple Citations in a list using liquid variables
Given I have a scholar configuration with
:
|
key
|
value
|
...
...
lib/jekyll/scholar/utilities.rb
View file @
86f7aee6
...
...
@@ -15,7 +15,7 @@ module Jekyll
module
Utilities
attr_reader
:config
,
:site
,
:query
,
:context
,
:prefix
,
:
keys
,
:
text
,
:max
:context
,
:prefix
,
:text
,
:max
def
split_arguments
(
arguments
)
...
...
@@ -373,15 +373,16 @@ module Jekyll
context
&&
context
[
'cited'
]
||
[]
end
def
keys
# De-reference keys (in case they are variables)
Array
(
@keys
).
map
do
|
key
|
context
.
send
(
:resolve
,
key
)
||
key
end
end
def
set_context_to
(
context
)
@context
,
@site
,
=
context
,
context
.
registers
[
:site
]
config
.
merge!
(
site
.
config
[
'scholar'
]
||
{})
# De-reference keys
keys
.
map!
do
|
key
|
context
.
send
(
:resolve
,
key
)
||
key
end
unless
keys
.
nil?
self
end
end
...
...
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