Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a306cda7
Commit
a306cda7
authored
Sep 15, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into merge-request-push-compare-ui
parents
2efcdcd0
0a8b6630
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
2 deletions
+16
-2
.flayignore
.flayignore
+1
-0
.gitlab-ci.yml
.gitlab-ci.yml
+6
-2
CHANGELOG
CHANGELOG
+1
-0
lib/banzai/filter/wiki_link_filter/rewriter.rb
lib/banzai/filter/wiki_link_filter/rewriter.rb
+1
-0
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
+7
-0
No files found.
.flayignore
View file @
a306cda7
*.erb
lib/gitlab/sanitizers/svg/whitelist.rb
.gitlab-ci.yml
View file @
a306cda7
...
...
@@ -209,8 +209,12 @@ rubocop: *exec
rake haml_lint
:
*exec
rake scss_lint
:
*exec
rake brakeman
:
*exec
rake flog
:
*exec
rake flay
:
*exec
rake flog
:
<<
:
*exec
allow_failure
:
yes
rake flay
:
<<
:
*exec
allow_failure
:
yes
license_finder
:
*exec
rake downtime_check
:
*exec
...
...
CHANGELOG
View file @
a306cda7
...
...
@@ -130,6 +130,7 @@ v 8.12.0 (unreleased)
- Allow bulk update merge requests from merge requests index page
- Add notification_settings API calls !5632 (mahcsig)
- Remove duplication between project builds and admin builds view !5680 (Katarzyna Kobierska Ula Budziszewska)
- Fix URLs with anchors in wiki !6300 (houqp)
- Deleting source project with existing fork link will close all related merge requests !6177 (Katarzyna Kobierska Ula Budziszeska)
- Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225
- Fix Gitlab::Popen.popen thread-safety issue
...
...
lib/banzai/filter/wiki_link_filter/rewriter.rb
View file @
a306cda7
...
...
@@ -31,6 +31,7 @@ module Banzai
def
apply_relative_link_rules!
if
@uri
.
relative?
&&
@uri
.
path
.
present?
link
=
::
File
.
join
(
@wiki_base_path
,
@uri
.
path
)
link
=
"
#{
link
}
#
#{
@uri
.
fragment
}
"
if
@uri
.
fragment
@uri
=
Addressable
::
URI
.
parse
(
link
)
end
end
...
...
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
View file @
a306cda7
...
...
@@ -127,6 +127,13 @@ describe Banzai::Pipeline::WikiPipeline do
expect
(
output
).
to
include
(
"href=
\"
#{
relative_url_root
}
/wiki_link_ns/wiki_link_project/wikis/nested/twice/page.md
\"
"
)
end
it
'rewrites links with anchor'
do
markdown
=
'[Link to Header](start-page#title)'
output
=
described_class
.
to_html
(
markdown
,
project:
project
,
project_wiki:
project_wiki
,
page_slug:
page
.
slug
)
expect
(
output
).
to
include
(
"href=
\"
#{
relative_url_root
}
/wiki_link_ns/wiki_link_project/wikis/start-page#title
\"
"
)
end
end
describe
"when creating root links"
do
...
...
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