Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-qtype_stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
a4845b77
Commit
a4845b77
authored
12 years ago
by
Tim Hunt
Browse files
Options
Downloads
Patches
Plain Diff
Coding style clean-up.
parent
27f14dcc
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
lang/en/qtype_stack.php
+7
-7
7 additions, 7 deletions
lang/en/qtype_stack.php
questiontype.php
+1
-1
1 addition, 1 deletion
questiontype.php
stack/utils.class.php
+4
-7
4 additions, 7 deletions
stack/utils.class.php
with
12 additions
and
15 deletions
lang/en/qtype_stack.php
+
7
−
7
View file @
a4845b77
This diff is collapsed.
Click to expand it.
questiontype.php
+
1
−
1
View file @
a4845b77
This diff is collapsed.
Click to expand it.
stack/utils.class.php
+
4
−
7
View file @
a4845b77
...
...
@@ -411,21 +411,18 @@ class stack_utils {
/**
* Replaces @blah@ with $@blah@$ if the castext is not otherwise enclosed by $'s.
*
*
* @access public
* @param string
* @return string
*/
public
static
function
wrap_around
(
$string
)
{
$string
=
preg_replace
(
'/\\\\\$/'
,
'escapeddollar'
,
$string
);
$string
=
self
::
wrap
(
$string
);
$string
=
preg_replace
(
'/escapeddollar/'
,
'\\\\$'
,
$string
);
return
$string
;
return
self
::
wrap
(
$string
);
}
/**
* Ensures that all elements within this text that need to be in math mode, are so.
* Specifically, CAS elements and inline input macros.
* @param string
* @return string
*/
public
static
function
delimit
(
$text
)
{
return
preg_replace_callback
(
'/@([^@]*)@/'
,
array
(
'stack_utils'
,
'delimit_callback'
),
$text
);
...
...
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