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
64e72af3
Commit
64e72af3
authored
Oct 09, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace apostrophe with right single quote to avoid markdown interpretation as issue 39.
parent
099cf355
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
lib/redcarpet/render/gitlab_html.rb
lib/redcarpet/render/gitlab_html.rb
+5
-0
spec/helpers/gitlab_markdown_helper_spec.rb
spec/helpers/gitlab_markdown_helper_spec.rb
+2
-2
No files found.
lib/redcarpet/render/gitlab_html.rb
View file @
64e72af3
...
@@ -10,6 +10,11 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
...
@@ -10,6 +10,11 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
super
options
super
options
end
end
def
normal_text
(
text
)
return
text
unless
text
.
present?
text
.
gsub
(
"'"
,
"’"
)
end
def
block_code
(
code
,
language
)
def
block_code
(
code
,
language
)
# New lines are placed to fix an rendering issue
# New lines are placed to fix an rendering issue
# with code wrapped inside <h1> tag for next case:
# with code wrapped inside <h1> tag for next case:
...
...
spec/helpers/gitlab_markdown_helper_spec.rb
View file @
64e72af3
...
@@ -535,7 +535,7 @@ describe GitlabMarkdownHelper do
...
@@ -535,7 +535,7 @@ describe GitlabMarkdownHelper do
project
.
issues
.
stub
(
:where
).
with
(
iid:
'39'
).
and_return
([
issue
])
project
.
issues
.
stub
(
:where
).
with
(
iid:
'39'
).
and_return
([
issue
])
actual
=
"Yes, it is @
#{
member
.
user
.
username
}
's task."
actual
=
"Yes, it is @
#{
member
.
user
.
username
}
's task."
expected
=
/Yes, it is <a.+>@
#{
member
.
user
.
username
}
<\/a>
'
s task/
expected
=
/Yes, it is <a.+>@
#{
member
.
user
.
username
}
<\/a>
’
s task/
markdown
(
actual
).
should
match
(
expected
)
markdown
(
actual
).
should
match
(
expected
)
end
end
...
@@ -566,7 +566,7 @@ describe GitlabMarkdownHelper do
...
@@ -566,7 +566,7 @@ describe GitlabMarkdownHelper do
it
"should leave inline code untouched"
do
it
"should leave inline code untouched"
do
markdown
(
"
\n
Don't use `$
#{
snippet
.
id
}
` here.
\n
"
).
should
==
markdown
(
"
\n
Don't use `$
#{
snippet
.
id
}
` here.
\n
"
).
should
==
"<p>Don
'
t use <code>$
#{
snippet
.
id
}
</code> here.</p>
\n
"
"<p>Don
’
t use <code>$
#{
snippet
.
id
}
</code> here.</p>
\n
"
end
end
it
"should leave ref-like autolinks untouched"
do
it
"should leave ref-like autolinks untouched"
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