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