From 1bd4541faaf0799d558a30bf329020187473077c Mon Sep 17 00:00:00 2001
From: coderkun
Date: Sat, 13 Apr 2019 19:18:32 +0200
Subject: [PATCH] Remove custom syntax for text formatting
---
app/TextFormatter.inc | 36 ------------------------------------
1 file changed, 36 deletions(-)
diff --git a/app/TextFormatter.inc b/app/TextFormatter.inc
index 573a68f9..f58dda74 100644
--- a/app/TextFormatter.inc
+++ b/app/TextFormatter.inc
@@ -65,9 +65,6 @@
// Add link targets
$string = $this->tLinks($string);
- // Handle custom formatting
- $string = $this->tCustom($string);
-
// Handle Seminarymedia
$string = $this->tSeminarymedia($string);
@@ -135,39 +132,6 @@
}
- /**
- * Handle custom formatting syntax.
- *
- * @Deprecated
- * @param string $string String to format
- * @return string Formatted string
- */
- private function tCustom($string)
- {
- // Important text
- $string = str_replace('[strong]', '', $string);
- $string = str_replace('[/strong]', '', $string);
-
- // Create tables
- $string = preg_replace('/(\[table\])\s+/u', '$1', $string);
- $string = preg_replace('/\s*(\[tr\])\s*/u', '$1', $string);
- $string = preg_replace('%\s+(\[/table\])%u', '$1', $string);
- $string = preg_replace('%\s*(\[/tr\])\s*%u', '$1', $string);
- $string = str_replace('[table]', '
', $string);
- $string = str_replace('[/table]', '
', $string);
- $string = str_replace('[tr]', '
', $string);
- $string = str_replace('[/tr]', '
', $string);
- $string = str_replace('[th]', '', $string);
- $string = str_replace('[/th]', ' | ', $string);
- $string = str_replace('[td]', '', $string);
- $string = str_replace('[/td]', ' | ', $string);
-
-
- // Return new string
- return $string;
- }
-
-
/**
* Handle including Seminarymedia.
*