File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 8
8
require_once ("../config.php " );
9
9
require_once ("../classes/constellation.php " );
10
10
require_once ("../template.php " );
11
+ require_once ("../libs/parsedown/Parsedown.php " );
11
12
12
13
if (isset ($ _COOKIE ['user ' ])&&!isset ($ _SESSION ['user ' ]))
13
14
{
Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ public function render($admin=0){
170
170
global $ icons ;
171
171
global $ classes , $ user ;
172
172
$ admin = $ admin && (($ user ->get_rank ()<=1 ) || ($ user ->get_username () == $ this ->username ));
173
+ $ Parsedown = new Parsedown ();
173
174
?>
174
175
<article class="panel panel-<?php echo $ classes [$ this ->type ];?> ">
175
176
<div class="panel-heading icon">
@@ -183,7 +184,7 @@ public function render($admin=0){
183
184
<time class="pull-right timeago" datetime="<?php echo $ this ->date ; ?> "><?php echo $ this ->date ; ?> </time>
184
185
</div>
185
186
<div class="panel-body">
186
- <?php echo $ this ->text ; ?>
187
+ <?php echo $ Parsedown -> setBreaksEnabled ( true )-> text ( $ this ->text ) ; ?>
187
188
</div>
188
189
<div class="panel-footer clearfix">
189
190
<small><?php echo _ ("Posted by " );?> : <?php echo $ this ->username ;
Original file line number Diff line number Diff line change 9
9
10
10
require_once ("config.php " );
11
11
require_once ("classes/constellation.php " );
12
+ require_once ("libs/parsedown/Parsedown.php " );
12
13
13
14
$ offset = 0 ;
14
15
You can’t perform that action at this time.
0 commit comments