Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
5f99851e
Commit
5f99851e
authored
2 years ago
by
Jan-Hendrik Willms
Browse files
Options
Downloads
Patches
Plain Diff
remove bogus third matching group handling, fixes #2060
Closes #2060 Merge request
studip/studip!1340
parent
279e54db
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/classes/SmileyFormat.php
+5
-5
5 additions, 5 deletions
lib/classes/SmileyFormat.php
with
5 additions
and
5 deletions
lib/classes/SmileyFormat.php
+
5
−
5
View file @
5f99851e
...
...
@@ -14,7 +14,7 @@ class SmileyFormat extends TextFormat
{
const
REGEXP
=
'(\>|^|\s):([_a-zA-Z][_a-z0-9A-Z-]*):(?=$|\<|\s)'
;
function
__construct
()
public
function
__construct
()
{
$rules
=
[];
...
...
@@ -38,20 +38,20 @@ class SmileyFormat extends TextFormat
/**
* Smiley notation defined by name (:name:)
*/
static
function
smiley
(
$markup
,
$matches
)
public
static
function
smiley
(
$markup
,
$matches
)
{
return
$matches
[
1
]
.
Smiley
::
getByName
(
$matches
[
2
])
->
getImageTag
()
.
$matches
[
3
]
;
return
$matches
[
1
]
.
Smiley
::
getByName
(
$matches
[
2
])
->
getImageTag
();
}
/**
* Smiley short notation as defined in database
*/
static
function
short
(
$markup
,
$matches
)
public
static
function
short
(
$markup
,
$matches
)
{
$smileys
=
Smiley
::
getShort
();
$name
=
$smileys
[
$matches
[
2
]]
??
''
;
return
$name
?
$matches
[
1
]
.
Smiley
::
getByName
(
$name
)
->
getImageTag
()
.
(
$matches
[
3
]
??
''
)
?
$matches
[
1
]
.
Smiley
::
getByName
(
$name
)
->
getImageTag
()
:
$matches
[
0
];
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment