Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
70b0dd78
Commit
70b0dd78
authored
Jan 30, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvements to php codehighlight
parent
1ecc7752
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
ApiMarkdown.php
extensions/apidoc/helpers/ApiMarkdown.php
+5
-2
No files found.
extensions/apidoc/helpers/ApiMarkdown.php
View file @
70b0dd78
...
@@ -39,9 +39,12 @@ class ApiMarkdown extends Markdown
...
@@ -39,9 +39,12 @@ class ApiMarkdown extends Markdown
}
else
{
}
else
{
$text
=
highlight_string
(
"<?php "
.
trim
(
$block
[
'text'
]),
true
);
$text
=
highlight_string
(
"<?php "
.
trim
(
$block
[
'text'
]),
true
);
$text
=
str_replace
(
'<?php'
,
''
,
$text
);
$text
=
str_replace
(
'<?php'
,
''
,
$text
);
if
((
$pos
=
strpos
(
$text
,
' '
))
!==
false
)
{
$text
=
substr
(
$text
,
0
,
$pos
)
.
substr
(
$text
,
$pos
+
6
);
}
}
// remove <code> tags added by php
}
$text
=
substr
(
trim
(
$text
),
6
,
-
7
);
// remove <code><span style="color: #000000">\n and </span>tags added by php
$text
=
substr
(
trim
(
$text
),
36
,
-
16
);
$code
=
'<pre><code'
;
$code
=
'<pre><code'
;
if
(
isset
(
$block
[
'language'
]))
if
(
isset
(
$block
[
'language'
]))
...
...
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