Skip to content

Commit

Permalink
Merge pull request #57 from boajer/fix/class_detection
Browse files Browse the repository at this point in the history
Improved class detection compatibility with WC3 standard
  • Loading branch information
llecaque authored Sep 9, 2016
2 parents eef343a + da94a00 commit 8e2fd0f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "qtism/qtism",
"description": "OAT QTI Software Module Library",
"type": "library",
"version": "0.10.13",
"version": "0.10.14",
"authors": [
{
"name": "Open Assessment Technologies S.A.",
Expand Down
2 changes: 1 addition & 1 deletion qtism/common/utils/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static public function isString256($string) {
* @return boolean
*/
static public function isClass($string) {
$pattern = "/^(?:[^\s]+?(?:\x20){0,1})+$/";
$pattern = "/^(?:[^\s]+?(?:\x20){0,})+$/";
return preg_match($pattern, $string) === 1;
}

Expand Down
1 change: 1 addition & 0 deletions test/qtism/common/utils/FormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public function validClassFormatProvider() {
array('a'),
array('my-class'),
array('my-class my-other-class'),
array('my-class my-other-class'),
array('theclass')
);
}
Expand Down

0 comments on commit 8e2fd0f

Please sign in to comment.