Skip to content

Commit

Permalink
Bug fixed in "Heading should not be all bold"
Browse files Browse the repository at this point in the history
Bug could occur if more than one heading in a page.
Needed to zero lastIndex of a regexp before re-use.
  • Loading branch information
70ray committed Jan 11, 2017
1 parent 0fa356a commit a1e7a1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions tools/proofers/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ var makePreview = function (txt, viewMode, styler) {

function boldLine() { // false if any non-bold char found
var result1;
re1.lastIndex = 0; // else will be left from previous use
while (true) {
result1 = re1.exec(headLine);
if (null === result1) {
Expand Down
2 changes: 1 addition & 1 deletion tools/proofers/proof_frame_enh.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function echo_proof_frame_enh( $ppage )
$header_args = array(
"css_files" => array("$code_url/styles/preview.css?a=16111501"),
"js_files" => array(
"preview.js?17010501",
"preview.js?17011101",
"previewControl.js?16111501",
"preview_strings.php",

Expand Down
2 changes: 1 addition & 1 deletion tools/proofers/text_frame_std.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function echo_text_frame_std( $ppage )
$header_args = array(
"css_files" => array("$code_url/styles/preview.css?a=16111501"),
"js_files" => array(
"preview.js?17010501",
"preview.js?17011101",
"previewControl.js?16111501",
"preview_strings.php",
),
Expand Down

0 comments on commit a1e7a1e

Please sign in to comment.