Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jekyll-pandoc-multiple-formats
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edsl
jekyll-pandoc-multiple-formats
Commits
a677d0ab
Unverified
Commit
a677d0ab
authored
7 years ago
by
fauno
Browse files
Options
Downloads
Patches
Plain Diff
simplify regex for relative path of assets
parent
7b6e7fbd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/jekyll-pandoc-multiple-formats/pandoc_file.rb
+3
-3
3 additions, 3 deletions
lib/jekyll-pandoc-multiple-formats/pandoc_file.rb
with
3 additions
and
3 deletions
lib/jekyll-pandoc-multiple-formats/pandoc_file.rb
+
3
−
3
View file @
a677d0ab
...
...
@@ -134,10 +134,10 @@ module Jekyll
end
def
content
relative_re
=
/
(!\[[^\]]*\]\()\/+
/
relative_re
=
/
\(\/(.*)\)
/
if
single_post?
# make all images relative to source dir
single_post
.
content
.
gsub
(
relative_re
,
'\1'
)
single_post
.
content
.
gsub
(
relative_re
,
'
(
\1
)
'
)
else
header_re
=
/^(#+.*\n*|.*\n[=-]+\n*)\Z/
bib_title
=
""
...
...
@@ -148,7 +148,7 @@ module Jekyll
# leaving an empty chapter title to mark it as such
content
=
post
.
content
.
gsub
(
header_re
,
''
)
# make all images relative to source dir
content
=
content
.
gsub
(
relative_re
,
'\1'
)
content
=
content
.
gsub
(
relative_re
,
'
(
\1
)
'
)
content
# we add the first bibliography title we can find in the end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment