Author: hakre (hakre) Committer: GitHub (web-flow) Pusher: cmb69 Date: 2021-11-19T13:10:57+01:00
Commit: https://github.com/php/web-php/commit/806766ba3c4ae92d03b16adb219535e8ae6859f3 Raw diff: https://github.com/php/web-php/commit/806766ba3c4ae92d03b16adb219535e8ae6859f3.diff Improve fix of php bug 74493 improvement of 6cec58d9 (Use exact word for parameter scroll 74493, 2017-04-25). some options are rendered with surrounding white-space (e.g. in front of "scale" for `bcdiv()`s' scale parameter [1]. fix is to not compare the word against surrounding spaces (UCS-0020) etc. by removal through ECMAScript 5 15.5.4.20 String.prototype.trim(), 2009-12-03. finally fix the lines' indent. 74493: https://bugs.php.net/bug.php?id=74493 [1]: https://php.net/manual/en/function.bcdiv.php ref: 6cec58d94b1357b907389e4b5123de85176bf635 Closes GH-460. Changed paths: M js/common.js Diff: diff --git a/js/common.js b/js/common.js index 99c262f0b3..6dbcaa146e 100644 --- a/js/common.js +++ b/js/common.js @@ -335,7 +335,7 @@ $(document).ready(function() { { var id = $(this).text().replace(/^&?(\.\.\.)?\$?/g, ''); var offsetTop = $('.parameters, .options').find('.parameter').filter(function() { - return $(this).text() === id; // https://bugs.php.net/bug.php?id=74493 + return $(this).text().trim() === id; // https://bugs.php.net/bug.php?id=74493 }).offset().top - 52; $.scrollTo({top: offsetTop, left: 0}, 400); }); -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php