ILIAS
trunk Revision v11.0_alpha-1723-g8e69f309bab
◀ 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
WordOnlyMarkdown.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
WordOnlyMarkdown
extends
SimpleDocumentMarkdown
28
{
32
public
function
getSupportedStructure
(): array
33
{
34
return
[
35
Structure::BOLD,
36
Structure::ITALIC
37
];
38
}
39
40
public
function
fromString
(
string
$text):
Text
\
WordOnlyMarkdown
41
{
42
return
new
Text\WordOnlyMarkdown
($this, $text);
43
}
44
45
public
function
isRawStringCompliant
(
string
$text): bool
46
{
47
$options = mb_regex_set_options();
48
try
{
49
mb_regex_set_options(
"m"
);
50
return
!mb_ereg_match(
51
'.*(('
. MRE::HEADINGS->value .
')|('
. MRE::UNORDERED_LIST->value .
')|('
. MRE::ORDERED_LIST->value .
')|'
.
52
'('
. MRE::LINE_BREAK->value .
')|('
. MRE::PARAGRAPH->value .
')|('
. MRE::BLOCKQUOTE->value .
')|'
.
53
'('
. MRE::CODEBLOCK->value .
')|('
. MRE::REF->value .
')|('
. MRE::LINK_REF_USAGE->value .
')|'
.
54
'('
. MRE::IMAGE->value .
')|('
. MRE::IMAGE_REF_USAGE->value .
'))'
,
55
$text
56
);
57
}
finally
{
58
mb_regex_set_options($options);
59
}
60
}
61
}
ILIAS\Data\Text
Definition:
Factory.php:21
ILIAS\Data\Text\Shape\WordOnlyMarkdown
Definition:
WordOnlyMarkdown.php:27
ILIAS\Data\Text\Text
Definition:
Text.php:23
ILIAS\Data\Text\Shape\WordOnlyMarkdown\isRawStringCompliant
isRawStringCompliant(string $text)
Definition:
WordOnlyMarkdown.php:45
ILIAS\Data\Text\Shape\WordOnlyMarkdown\fromString
fromString(string $text)
Definition:
WordOnlyMarkdown.php:40
ILIAS\Data\Text\Shape\WordOnlyMarkdown\getSupportedStructure
getSupportedStructure()
Definition:
WordOnlyMarkdown.php:32
ILIAS\Data\Text\Shape\SimpleDocumentMarkdown
Definition:
SimpleDocumentMarkdown.php:27
ILIAS\Data\Text\Shape
Definition:
Markdown.php:21
ILIAS\Data\Text\WordOnlyMarkdown
Definition:
WordOnlyMarkdown.php:25
ILIAS\Data\Text\Structure
Structure
Definition:
Structure.php:23
ILIAS\Data\Text\Markup\MarkdownRegExps
MarkdownRegExps
Regular expressions to detect constructs from CommonMarkdown.
Definition:
MarkdownRegExps.php:28
components
ILIAS
Data
src
Text
Shape
WordOnlyMarkdown.php
Generated on Sun Apr 6 2025 23:03:02 for ILIAS by
1.8.13 (using
Doxyfile
)