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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
ad3defa3
Commit
ad3defa3
authored
Oct 11, 2013
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip relative links render in help page.
parent
f81532b5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
features/project/source/markdown_render.feature
features/project/source/markdown_render.feature
+5
-0
features/steps/project/project_markdown_render.rb
features/steps/project/project_markdown_render.rb
+12
-0
lib/redcarpet/render/gitlab_html.rb
lib/redcarpet/render/gitlab_html.rb
+5
-1
No files found.
features/project/source/markdown_render.feature
View file @
ad3defa3
...
@@ -68,3 +68,8 @@ Feature: Project markdown render
...
@@ -68,3 +68,8 @@ Feature: Project markdown render
When
I go back to wiki page home
When
I go back to wiki page home
And
I click on Rake tasks link
And
I click on Rake tasks link
Then
I see Rake tasks directory
Then
I see Rake tasks directory
Scenario
:
I
visit the help page with markdown
Given
I visit to the help page
And
I select a page with markdown
Then
I should see a help page with markdown
\ No newline at end of file
features/steps/project/project_markdown_render.rb
View file @
ad3defa3
...
@@ -150,4 +150,16 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
...
@@ -150,4 +150,16 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
page
.
should
have_content
"backup_restore.md"
page
.
should
have_content
"backup_restore.md"
page
.
should
have_content
"maintenance.md"
page
.
should
have_content
"maintenance.md"
end
end
Given
'I visit to the help page'
do
visit
help_path
end
And
'I select a page with markdown'
do
click_link
"Rake Tasks"
end
Then
'I should see a help page with markdown'
do
page
.
should
have_content
"GitLab provides some specific rake tasks to enable special features or perform maintenance tasks"
end
end
end
\ No newline at end of file
lib/redcarpet/render/gitlab_html.rb
View file @
ad3defa3
...
@@ -35,7 +35,11 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
...
@@ -35,7 +35,11 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
end
end
def
preprocess
(
full_document
)
def
preprocess
(
full_document
)
if
@project
h
.
create_relative_links
(
full_document
,
@project
.
path_with_namespace
,
@ref
,
@request_path
,
is_wiki?
)
h
.
create_relative_links
(
full_document
,
@project
.
path_with_namespace
,
@ref
,
@request_path
,
is_wiki?
)
else
full_document
end
end
end
def
postprocess
(
full_document
)
def
postprocess
(
full_document
)
...
...
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