ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
SimpleDocumentMarkdown.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Data\Text\Shape
;
22
23
use
ILIAS\Data\Text\Structure
;
24
use
ILIAS\Data\Text
;
25
use
ILIAS\Data\Text\Markup\MarkdownRegExps
as MRE;
26
27
class
SimpleDocumentMarkdown
extends
Markdown
28
{
32
public
function
getSupportedStructure
(): array
33
{
34
return
[
35
Structure::BOLD,
36
Structure::ITALIC,
37
Structure::HEADING_1,
38
Structure::HEADING_2,
39
Structure::HEADING_3,
40
Structure::HEADING_4,
41
Structure::HEADING_5,
42
Structure::HEADING_6,
43
Structure::UNORDERED_LIST,
44
Structure::ORDERED_LIST,
45
Structure::PARAGRAPH,
46
Structure::LINK,
47
Structure::BLOCKQUOTE,
48
Structure::CODE
49
];
50
}
51
52
public
function
fromString
(
string
$text):
Text
\
SimpleDocumentMarkdown
53
{
54
return
new
Text\SimpleDocumentMarkdown
($this, $text);
55
}
56
57
public
function
isRawStringCompliant
(
string
$text): bool
58
{
59
$options = mb_regex_set_options();
60
try
{
61
mb_regex_set_options(
"m"
);
62
return
!mb_ereg_match(
63
'.*(('
. MRE::IMAGE->value .
')|('
. MRE::REF->value .
')|('
. MRE::IMAGE_REF_USAGE->value .
'))'
,
64
$text
65
);
66
}
finally
{
67
mb_regex_set_options($options);
68
}
69
}
70
}
ILIAS\Data\Text
Definition:
Factory.php:21
ILIAS\Data\Text\Shape\SimpleDocumentMarkdown\isRawStringCompliant
isRawStringCompliant(string $text)
Definition:
SimpleDocumentMarkdown.php:57
ILIAS\Data\Text\Text
Definition:
Text.php:23
ILIAS\Data\Text\Shape\SimpleDocumentMarkdown\getSupportedStructure
getSupportedStructure()
Definition:
SimpleDocumentMarkdown.php:32
ILIAS\Data\Text\SimpleDocumentMarkdown
Definition:
SimpleDocumentMarkdown.php:25
ILIAS\Data\Text\Markdown
Definition:
Markdown.php:25
ILIAS\Data\Text\Shape\SimpleDocumentMarkdown
Definition:
SimpleDocumentMarkdown.php:27
ILIAS\Data\Text\CODE
Definition:
Structure.php:39
ILIAS\Data\Text\Shape
Definition:
Markdown.php:21
ILIAS\Data\Text\Structure
Structure
Definition:
Structure.php:23
ILIAS\Data\Text\Shape\SimpleDocumentMarkdown\fromString
fromString(string $text)
Definition:
SimpleDocumentMarkdown.php:52
ILIAS\Data\Text\Markup\MarkdownRegExps
MarkdownRegExps
Regular expressions to detect constructs from CommonMarkdown.
Definition:
MarkdownRegExps.php:28
components
ILIAS
Data
src
Text
Shape
SimpleDocumentMarkdown.php
Generated on Sun Apr 13 2025 23:02:42 for ILIAS by
1.8.13 (using
Doxyfile
)