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.
This commit is contained in:
Eloy Lafuente (stronk7)
2021-10-20 17:24:15 +02:00
parent 2b2897bf10
commit fdc2dcf264
10 changed files with 898 additions and 898 deletions
+7 -7
View File
@@ -2,15 +2,15 @@
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="moodle_database" type="databaseType" />
<xs:complexType name="databaseType">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="table"
type="tableType" />
</xs:sequence>
<xs:attribute name="version" type="xs:float" use="required" />
<xs:sequence>
<xs:element maxOccurs="unbounded" name="table"
type="tableType" />
</xs:sequence>
<xs:attribute name="version" type="xs:float" use="required" />
<xs:attribute name="release" type="xs:string"></xs:attribute>
<xs:attribute name="timestamp" type="xs:dateTime"
use="required" />
<xs:attribute name="comment" type="xs:string" />
use="required" />
<xs:attribute name="comment" type="xs:string" />
</xs:complexType>
<xs:complexType name="tableType">
<xs:sequence>
+21 -21
View File
@@ -5,7 +5,7 @@
* http://sourceforge.net/projects/lamplib
* This project is administered by Markus Baker, Harry Fuecks and Matt
* Mitchell, and the project code is in the public domain.
*
*
* Thanks, guys!
*
* @package moodlecore
@@ -23,7 +23,7 @@
define("LEXER_EXIT", 4);
/** LEXER_SPECIAL = 5 */
define("LEXER_SPECIAL", 5);
/**
* Compounded regular expression. Any of
* the contained patterns could match and
@@ -37,7 +37,7 @@
var $_labels;
var $_regex;
var $_case;
/**
* Constructor. Starts with no patterns.
* @param bool $case True for case sensitive, false
@@ -75,7 +75,7 @@
$this->_labels[$count] = $label;
$this->_regex = null;
}
/**
* Attempts to match all patterns at once against
* a string.
@@ -101,7 +101,7 @@
}
return true;
}
/**
* Compounds the patterns into a single
* regular expression separated with the
@@ -121,7 +121,7 @@
}
return $this->_regex;
}
/**
* Accessor for perl regex mode flags to use.
* @return string Flags as string.
@@ -131,7 +131,7 @@
return ($this->_case ? "msS" : "msSi");
}
}
/**
* States for a stack machine.
*
@@ -141,7 +141,7 @@
*/
class StateStack {
var $_stack;
/**
* Constructor. Starts in named state.
* @param string $start Starting state name.
@@ -169,7 +169,7 @@
function getCurrent() {
return $this->_stack[count($this->_stack) - 1];
}
/**
* Adds a state to the stack and sets it
* to be the current state.
@@ -179,7 +179,7 @@
function enter($state) {
array_push($this->_stack, $state);
}
/**
* Leaves the current state and reverts
* to the previous one.
@@ -195,7 +195,7 @@
return true;
}
}
/**
* Accepts text and breaks it into tokens.
* Some optimisation to make the sure the
@@ -213,7 +213,7 @@
var $_mode;
var $_mode_handlers;
var $_case;
/**
* Sets up the lexer in case insensitive matching
* by default.
@@ -240,7 +240,7 @@
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
self::__construct($parser, $start, $case);
}
/**
* Adds a token search pattern for a particular
* parsing mode. The pattern does not change the
@@ -258,7 +258,7 @@
}
$this->_regexes[$mode]->addPattern($pattern);
}
/**
* Adds a pattern that will enter a new parsing
* mode. Useful for entering parenthesis, strings,
@@ -278,7 +278,7 @@
}
$this->_regexes[$mode]->addPattern($pattern, $new_mode);
}
/**
* Adds a pattern that will exit the current mode
* and re-enter the previous one.
@@ -293,7 +293,7 @@
}
$this->_regexes[$mode]->addPattern($pattern, "__exit");
}
/**
* Adds a pattern that has a special mode.
* Acts as an entry and exit pattern in one go.
@@ -311,7 +311,7 @@
}
$this->_regexes[$mode]->addPattern($pattern, "_$special");
}
/**
* Adds a mapping from a mode to another handler.
* @param string $mode Mode to be remapped.
@@ -321,7 +321,7 @@
function mapHandler($mode, $handler) {
$this->_mode_handlers[$mode] = $handler;
}
/**
* Splits the page text into tokens. Will fail
* if the handlers report an error or if no
@@ -352,7 +352,7 @@
}
return $this->_invokeParser($raw, LEXER_UNMATCHED);
}
/**
* Sends the matched token and any leading unmatched
* text to the parser changing the lexer to a new
@@ -390,7 +390,7 @@
}
return $this->_invokeParser($matched, LEXER_MATCHED);
}
/**
* Calls the parser method named after the current
* mode. Empty content will be ignored.
@@ -409,7 +409,7 @@
}
return $this->_parser->$handler($content, $is_match);
}
/**
* Tries to match a chunk of text and if successful
* removes the recognised chunk and any leading
+2 -2
View File
@@ -78,9 +78,9 @@ class core_html2text_testcase extends basic_testcase {
*/
public function test_build_link_list() {
// Note the trailing whitespace left intentionally in the text.
// Note the trailing whitespace left intentionally in the text after first link.
$text = 'Total of <a title="List of integrated issues"
href="http://tr.mdl.org/sh.jspa?r=1&j=p+%3D+%22I+d%22+%3D">
href="http://tr.mdl.org/sh.jspa?r=1&j=p+%3D+%22I+d%22+%3D"> ' . '
<strong>27 issues</strong></a> and <a href="http://another.url/?f=a&amp;b=2">some</a> other
have been fixed <strong><a href="http://third.url/view.php">last week</a></strong>';