Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CentralNic
parsedown
Commits
f0fbdaa6
Commit
f0fbdaa6
authored
Jan 22, 2014
by
Emanuil Rusev
Browse files
backtick within code span
parent
e20c0a29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Parsedown.php
View file @
f0fbdaa6
...
...
@@ -948,9 +948,9 @@ class Parsedown
case
'`'
:
if
(
preg_match
(
'/^
`
(.+?)
`
/'
,
$text
,
$matches
))
if
(
preg_match
(
'/^
(`+)
(.+?)
\1(?!`)
/'
,
$text
,
$matches
))
{
$element_text
=
$matches
[
1
];
$element_text
=
$matches
[
2
];
$element_text
=
htmlspecialchars
(
$element_text
,
ENT_NOQUOTES
,
'UTF-8'
);
$markup
.
=
'<code>'
.
$element_text
.
'</code>'
;
...
...
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