Scope analysis does not provide support for undeclared variables.
0 instances of missing semicolons counted.
0 unnecessary instances of the keyword new counted.
- 1
- -2
- -3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- -27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- -45
- -46
- 47
- 48
- 49
- -50
- 51
- 52
- -53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- /*global global*/
- (function pdcomment_init() {
- // parses the prettydiff settings comment
- //
- // - Source Priorities:
- // * the prettydiff comment is only accepted if it occurs before non-comments
- // (near the top)
- // * options.source is the priority material for reading the comment
- // * the prettydiff comment will be processed from options.diff only if it
- // present there, missing from options.source, and options.mode is diff
- //
- // - Examples:
- // /*prettydiff.com width:80 preserve:4*/
- // /* prettydiff.com width:80 preserve:4 */
- // /*prettydiff.com width=80 preserve=4 */
- // // prettydiff.com width=80 preserve:4
- // <!-- prettydiff.com width:80 preserve=4 -->
- // <!--prettydiff.com width:40 preserve:2-->
- //
- // - Parsing Considerations:
- // * there may be any amount of space at the start or end of the comment
- // * "prettydiff.com" must exist at the start of the comment
- // * comment must exist prior to non-comment tokens (near top of code)
- // * parameters are name value pairs separated by white space
- // * the delimiter separating name and value is either ":" or "=" characters
- "use strict";
- const pdcomment = function pdcomment_(options) {
- let pdcom = options.source.search(/((\/(\*|\/))|<!--*)\s*prettydiff\.com/),
- a = (pdcom > -1)
- ? pdcom
- : options.diff.search(/((\/(\*|\/))|<!--*)\s*prettydiff\.com/),
- b = 0,
- quote = "",
- op = [];
- const ops = [],
- source = (pdcom > -1)
- ? options.source
- : options.diff,
- len = source.length,
- comment = (source.charAt(a) === "<")
- ? "<!--"
- : (source.charAt(a + 1) === "/")
- ? "//"
- : "/\u002a",
- esc = function pdcomment_esc() {
- if (source.charAt(a - 1) !== "\\") {
- return false;
- }
- let x = a;
- do {
- x = x - 1;
- } while (x > 0 && source.charAt(x) === "\\");
- if ((a - x) % 2 === 0) {
- return true;
- }
- return false;
- };
- };
- global
- .prettydiff
- .api
- .pdcommenttttt = pdcomment;
- }());