From eb0ea976ffc57aa3701e3e4cf6ce18375e9d10c2 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 10 Apr 2013 11:36:13 -0400 Subject: Added tests for the scanner getHex method. --- src/HTML5/Parser/Scanner.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/HTML5/Parser/Scanner.php b/src/HTML5/Parser/Scanner.php index 2500dab..77f14fb 100644 --- a/src/HTML5/Parser/Scanner.php +++ b/src/HTML5/Parser/Scanner.php @@ -86,15 +86,13 @@ class Scanner { } /** - * Get the next group of that is a hex value. + * Get the next group of that contains hex characters. * * Note, along with getting the characters the pointer in the data will be * moved as well. - * - * @todo There is a potential for many false positives with this method. Make it more accurate. * * @return string - * The next group that is a hex value. + * The next group that is hex characters. */ public function getHex() { return $this->is->charsWhile(self::CHARS_HEX); -- cgit v1.2.3 From 734464d5194b7a7ada25376955859b0d3a608ab1 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 10 Apr 2013 11:58:40 -0400 Subject: Moved the scanner to the new string input parser. The current test will fail until the parser is updated to handle positioning correctly. --- src/HTML5/Parser/Scanner.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/HTML5/Parser/Scanner.php b/src/HTML5/Parser/Scanner.php index 77f14fb..10698d7 100644 --- a/src/HTML5/Parser/Scanner.php +++ b/src/HTML5/Parser/Scanner.php @@ -18,7 +18,7 @@ class Scanner { /** * Create a new Scanner. * - * @param \HTML5\InputStream $input + * @param \HTML5\Parser\InputStream $input * An InputStream to be scanned. */ public function __construct($input) { @@ -36,10 +36,7 @@ class Scanner { } /** - * Take a peek at the character after the next character in the data. - * - * For example, you start scanning the string abc. The pointer is before a. - * When you start peek() will return b while next() will return a. + * Take a peek at the next character in the data. * * @return string * The next character. -- cgit v1.2.3