Browse Source

tools: favor === over == in license2rtf.js

PR-URL: https://github.com/nodejs/node/pull/8068.patch
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
v7.x
Rich Trott 8 years ago
committed by Franziska Hinkelmann
parent
commit
3fe55f6f91
  1. 8
      tools/license2rtf.js

8
tools/license2rtf.js

@ -104,7 +104,7 @@ function ParagraphParser() {
if (block_has_c_style_comment) {
var prev = line;
line = line.replace(/^(\s*?)(?:\s?\*\/|\/\*\s|\s\*\s?)/, '$1');
if (prev == line)
if (prev === line)
line = line.replace(/^\s{2}/, '');
if (/\*\//.test(prev))
block_has_c_style_comment = false;
@ -142,8 +142,8 @@ function ParagraphParser() {
var line_li = result[2];
// Flush the paragraph when there is a li or an indentation jump
if (line_li || (line_indent != paragraph_line_indent &&
paragraph_line_indent != -1)) {
if (line_li || (line_indent !== paragraph_line_indent &&
paragraph_line_indent !== -1)) {
flushParagraph();
paragraph.li = line_li;
}
@ -151,7 +151,7 @@ function ParagraphParser() {
// Set the paragraph indent that we use to detect indentation jumps. When
// we just detected a list indicator, wait
// for the next line to arrive before setting this.
if (!line_li && paragraph_line_indent != -1) {
if (!line_li && paragraph_line_indent !== -1) {
paragraph_line_indent = line_indent;
}

Loading…
Cancel
Save