mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-77365 count_words: Make span> an inline tag
This commit merges the fix and test for the incorrect counting of words in essay type questions. The issue is due <span> tags not being counted as inline tags.
This commit is contained in:
parent
a31f5830bd
commit
d35affa0fd
@ -8386,7 +8386,7 @@ function count_words($string) {
|
||||
</ # Start of close tag.
|
||||
(?! # Do not match any of these specific close tag names.
|
||||
a> | b> | del> | em> | i> |
|
||||
ins> | s> | small> |
|
||||
ins> | s> | small> | span> |
|
||||
strong> | sub> | sup> | u>
|
||||
)
|
||||
\w+ # But, apart from those execptions, match any tag name.
|
||||
|
@ -4003,6 +4003,7 @@ EOF;
|
||||
[2, "one\ftwo"],
|
||||
[1, "SO<sub>4</sub><sup>2-</sup>"],
|
||||
[6, '4+4=8 i.e. O(1) a,b,c,d I’m black&blue_really'],
|
||||
[1, '<span>a</span><span>b</span>'],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user