Skip to content

Commit fdc2dcf

Browse files
committed
MDL-72871 cleanup: Remove incorrect whitespace from codebase
Differences can be checked with git diff --ignore-all-space and that will show that the only non-whitespace change is in a test in the git lib/tests/html2text_test.php file. In that case the whitespace has been replaced by a quoted string (of whitespaces) keeping the test 100% equivalent and workarrounding the whitespace.
1 parent 2b2897b commit fdc2dcf

File tree

10 files changed

+930
-930
lines changed

10 files changed

+930
-930
lines changed

lib/dtl/dbdata.xsd

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
33
<xs:element name="moodle_database" type="databaseType" />
44
<xs:complexType name="databaseType">
5-
<xs:sequence>
6-
<xs:element maxOccurs="unbounded" name="table"
7-
type="tableType" />
8-
</xs:sequence>
9-
<xs:attribute name="version" type="xs:float" use="required" />
5+
<xs:sequence>
6+
<xs:element maxOccurs="unbounded" name="table"
7+
type="tableType" />
8+
</xs:sequence>
9+
<xs:attribute name="version" type="xs:float" use="required" />
1010
<xs:attribute name="release" type="xs:string"></xs:attribute>
1111
<xs:attribute name="timestamp" type="xs:dateTime"
12-
use="required" />
13-
<xs:attribute name="comment" type="xs:string" />
12+
use="required" />
13+
<xs:attribute name="comment" type="xs:string" />
1414
</xs:complexType>
1515
<xs:complexType name="tableType">
1616
<xs:sequence>

lib/lexer.php

+21-21
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* http://sourceforge.net/projects/lamplib
66
* This project is administered by Markus Baker, Harry Fuecks and Matt
77
* Mitchell, and the project code is in the public domain.
8-
*
8+
*
99
* Thanks, guys!
1010
*
1111
* @package moodlecore
@@ -23,7 +23,7 @@
2323
define("LEXER_EXIT", 4);
2424
/** LEXER_SPECIAL = 5 */
2525
define("LEXER_SPECIAL", 5);
26-
26+
2727
/**
2828
* Compounded regular expression. Any of
2929
* the contained patterns could match and
@@ -37,7 +37,7 @@ class ParallelRegex {
3737
var $_labels;
3838
var $_regex;
3939
var $_case;
40-
40+
4141
/**
4242
* Constructor. Starts with no patterns.
4343
* @param bool $case True for case sensitive, false
@@ -75,7 +75,7 @@ function addPattern($pattern, $label = true) {
7575
$this->_labels[$count] = $label;
7676
$this->_regex = null;
7777
}
78-
78+
7979
/**
8080
* Attempts to match all patterns at once against
8181
* a string.
@@ -101,7 +101,7 @@ function match($subject, &$match) {
101101
}
102102
return true;
103103
}
104-
104+
105105
/**
106106
* Compounds the patterns into a single
107107
* regular expression separated with the
@@ -121,7 +121,7 @@ function _getCompoundedRegex() {
121121
}
122122
return $this->_regex;
123123
}
124-
124+
125125
/**
126126
* Accessor for perl regex mode flags to use.
127127
* @return string Flags as string.
@@ -131,7 +131,7 @@ function _getPerlMatchingFlags() {
131131
return ($this->_case ? "msS" : "msSi");
132132
}
133133
}
134-
134+
135135
/**
136136
* States for a stack machine.
137137
*
@@ -141,7 +141,7 @@ function _getPerlMatchingFlags() {
141141
*/
142142
class StateStack {
143143
var $_stack;
144-
144+
145145
/**
146146
* Constructor. Starts in named state.
147147
* @param string $start Starting state name.
@@ -169,7 +169,7 @@ public function StateStack($start) {
169169
function getCurrent() {
170170
return $this->_stack[count($this->_stack) - 1];
171171
}
172-
172+
173173
/**
174174
* Adds a state to the stack and sets it
175175
* to be the current state.
@@ -179,7 +179,7 @@ function getCurrent() {
179179
function enter($state) {
180180
array_push($this->_stack, $state);
181181
}
182-
182+
183183
/**
184184
* Leaves the current state and reverts
185185
* to the previous one.
@@ -195,7 +195,7 @@ function leave() {
195195
return true;
196196
}
197197
}
198-
198+
199199
/**
200200
* Accepts text and breaks it into tokens.
201201
* Some optimisation to make the sure the
@@ -213,7 +213,7 @@ class Lexer {
213213
var $_mode;
214214
var $_mode_handlers;
215215
var $_case;
216-
216+
217217
/**
218218
* Sets up the lexer in case insensitive matching
219219
* by default.
@@ -240,7 +240,7 @@ public function Lexer(&$parser, $start = "accept", $case = false) {
240240
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
241241
self::__construct($parser, $start, $case);
242242
}
243-
243+
244244
/**
245245
* Adds a token search pattern for a particular
246246
* parsing mode. The pattern does not change the
@@ -258,7 +258,7 @@ function addPattern($pattern, $mode = "accept") {
258258
}
259259
$this->_regexes[$mode]->addPattern($pattern);
260260
}
261-
261+
262262
/**
263263
* Adds a pattern that will enter a new parsing
264264
* mode. Useful for entering parenthesis, strings,
@@ -278,7 +278,7 @@ function addEntryPattern($pattern, $mode, $new_mode) {
278278
}
279279
$this->_regexes[$mode]->addPattern($pattern, $new_mode);
280280
}
281-
281+
282282
/**
283283
* Adds a pattern that will exit the current mode
284284
* and re-enter the previous one.
@@ -293,7 +293,7 @@ function addExitPattern($pattern, $mode) {
293293
}
294294
$this->_regexes[$mode]->addPattern($pattern, "__exit");
295295
}
296-
296+
297297
/**
298298
* Adds a pattern that has a special mode.
299299
* Acts as an entry and exit pattern in one go.
@@ -311,7 +311,7 @@ function addSpecialPattern($pattern, $mode, $special) {
311311
}
312312
$this->_regexes[$mode]->addPattern($pattern, "_$special");
313313
}
314-
314+
315315
/**
316316
* Adds a mapping from a mode to another handler.
317317
* @param string $mode Mode to be remapped.
@@ -321,7 +321,7 @@ function addSpecialPattern($pattern, $mode, $special) {
321321
function mapHandler($mode, $handler) {
322322
$this->_mode_handlers[$mode] = $handler;
323323
}
324-
324+
325325
/**
326326
* Splits the page text into tokens. Will fail
327327
* if the handlers report an error or if no
@@ -352,7 +352,7 @@ function parse($raw) {
352352
}
353353
return $this->_invokeParser($raw, LEXER_UNMATCHED);
354354
}
355-
355+
356356
/**
357357
* Sends the matched token and any leading unmatched
358358
* text to the parser changing the lexer to a new
@@ -390,7 +390,7 @@ function _dispatchTokens($unmatched, $matched, $mode = false) {
390390
}
391391
return $this->_invokeParser($matched, LEXER_MATCHED);
392392
}
393-
393+
394394
/**
395395
* Calls the parser method named after the current
396396
* mode. Empty content will be ignored.
@@ -409,7 +409,7 @@ function _invokeParser($content, $is_match) {
409409
}
410410
return $this->_parser->$handler($content, $is_match);
411411
}
412-
412+
413413
/**
414414
* Tries to match a chunk of text and if successful
415415
* removes the recognised chunk and any leading

lib/tests/html2text_test.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public function test_zero() {
7878
*/
7979
public function test_build_link_list() {
8080

81-
// Note the trailing whitespace left intentionally in the text.
81+
// Note the trailing whitespace left intentionally in the text after first link.
8282
$text = 'Total of <a title="List of integrated issues"
83-
href="http://tr.mdl.org/sh.jspa?r=1&j=p+%3D+%22I+d%22+%3D">
83+
href="http://tr.mdl.org/sh.jspa?r=1&j=p+%3D+%22I+d%22+%3D"> ' . '
8484
<strong>27 issues</strong></a> and <a href="http://another.url/?f=a&amp;b=2">some</a> other
8585
have been fixed <strong><a href="http://third.url/view.php">last week</a></strong>';
8686

mod/wiki/README

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Wiki 2.0
22

3-
by Jordi Piguillem and Ludo (Marc Alier) 2008 - Universitat Politecnica de
3+
by Jordi Piguillem and Ludo (Marc Alier) 2008 - Universitat Politecnica de
44
Catalunya
5-
http://www.upc.edu - http://dfwikilabs.org
5+
http://www.upc.edu - http://dfwikilabs.org

0 commit comments

Comments
 (0)