Correct two uses of ==
.
This commit is contained in:
parent
824e66a62f
commit
8f44cc21db
2 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ function parseList(node) {
|
||||||
|
|
||||||
function parseCodeBlock(node) {
|
function parseCodeBlock(node) {
|
||||||
let codeNode;
|
let codeNode;
|
||||||
if (!((codeNode = node.firstChild) && codeNode.nodeName == "CODE")) {
|
if (!((codeNode = node.firstChild) && codeNode.nodeName === "CODE")) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
let language = "";
|
let language = "";
|
||||||
|
@ -101,7 +101,7 @@ const nodes = buildNodeMap();
|
||||||
function parseNode(node) {
|
function parseNode(node) {
|
||||||
if (node.nodeType === Node.TEXT_NODE) {
|
if (node.nodeType === Node.TEXT_NODE) {
|
||||||
return new TextPart(node.nodeValue);
|
return new TextPart(node.nodeValue);
|
||||||
} else if (node.nodeType == Node.ELEMENT_NODE) {
|
} else if (node.nodeType === Node.ELEMENT_NODE) {
|
||||||
const f = nodes[node.nodeName];
|
const f = nodes[node.nodeName];
|
||||||
if (!f) {
|
if (!f) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -38,7 +38,7 @@ export class TextMessageView extends BaseMessageView {
|
||||||
const formatFunction = {
|
const formatFunction = {
|
||||||
header: headerBlock => tag["h" + Math.min(6,headerBlock.level)]({}, renderParts(headerBlock.inlines)),
|
header: headerBlock => tag["h" + Math.min(6,headerBlock.level)]({}, renderParts(headerBlock.inlines)),
|
||||||
codeblock: codeBlock => tag.pre({}, tag.code({}, text(codeBlock.text))),
|
codeblock: codeBlock => tag.pre({}, tag.code({}, text(codeBlock.text))),
|
||||||
emph: emphPart => tag.em({}, renderPart(emphPart.inlines)),
|
emph: emphPart => tag.em({}, renderParts(emphPart.inlines)),
|
||||||
code: codePart => tag.code({}, text(codePart.text)),
|
code: codePart => tag.code({}, text(codePart.text)),
|
||||||
text: textPart => text(textPart.text),
|
text: textPart => text(textPart.text),
|
||||||
link: linkPart => tag.a({ href: linkPart.url, target: "_blank", rel: "noopener" }, renderParts(linkPart.inlines)),
|
link: linkPart => tag.a({ href: linkPart.url, target: "_blank", rel: "noopener" }, renderParts(linkPart.inlines)),
|
||||||
|
|
Reference in a new issue