BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d43d7471
Commit
d43d7471
authored
Oct 12, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/relative_render' of /home/git/repositories/gitlab/gitlabhq
parents
f81532b5
ad3defa3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
markdown_render.feature
features/project/source/markdown_render.feature
+6
-0
project_markdown_render.rb
features/steps/project/project_markdown_render.rb
+13
-0
gitlab_html.rb
lib/redcarpet/render/gitlab_html.rb
+5
-1
No files found.
features/project/source/markdown_render.feature
View file @
d43d7471
...
...
@@ -68,3 +68,8 @@ Feature: Project markdown render
When
I go back to wiki page home
And
I click on Rake tasks link
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 @
d43d7471
...
...
@@ -150,4 +150,16 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
page
.
should
have_content
"backup_restore.md"
page
.
should
have_content
"maintenance.md"
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
\ No newline at end of file
lib/redcarpet/render/gitlab_html.rb
View file @
d43d7471
...
...
@@ -35,7 +35,11 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
end
def
preprocess
(
full_document
)
h
.
create_relative_links
(
full_document
,
@project
.
path_with_namespace
,
@ref
,
@request_path
,
is_wiki?
)
if
@project
h
.
create_relative_links
(
full_document
,
@project
.
path_with_namespace
,
@ref
,
@request_path
,
is_wiki?
)
else
full_document
end
end
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