mirror of
https://github.com/til-schneider/slim-wiki.git
synced 2025-08-13 20:14:10 +02:00
Added support for TODO
and trailing colon (e.g. TODO:
)
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.fixme {
|
||||
.todo {
|
||||
border: 1px solid @colorText;
|
||||
border-radius: 4px;
|
||||
background-color: #ffd703;
|
||||
|
@@ -17,8 +17,8 @@ class RenderService {
|
||||
require_once __DIR__ . '/../lib/parsedown/Parsedown.php';
|
||||
$html = Parsedown::instance()->text($markdownText);
|
||||
|
||||
// Support `FIXME`
|
||||
$html = preg_replace('/(^|\\W)FIXME(\\W|$)/', '$1<span class="fixme">FIXME</span>$2', $html);
|
||||
// Support `TODO` and `FIXME`
|
||||
$html = preg_replace('/(^|\\W)(TODO|FIXME):?(\\W|$)/', '$1<span class="todo">$2</span>$3', $html);
|
||||
|
||||
if ($isEditMode) {
|
||||
// Append `?edit` to local links (in order to stay in edit mode)
|
||||
|
Reference in New Issue
Block a user