mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 03:27:32 +08:00
Fix multiline comment
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import Configuration from "./Configuration.js"
|
||||
import ComputedType from "./entity/ComputedType.js"
|
||||
import Configuration from "./Configuration.js"
|
||||
import UnionType from "./entity/UnionType.js"
|
||||
|
||||
/**
|
||||
@@ -316,10 +316,15 @@ export default class Utility {
|
||||
static clearHTMLWhitespace(value) {
|
||||
return value
|
||||
.replaceAll(" ", "\u00A0") // whitespace
|
||||
.replaceAll("<br>", "\n") // newlines
|
||||
.replaceAll(/<br\s*\/>|<br>/, "\n") // newlines
|
||||
.replaceAll(/(\<!--.*?\-->)/g, "") // html comments
|
||||
}
|
||||
|
||||
/** @param {String} value */
|
||||
static encodeHTMLWhitespace(value) {
|
||||
return value.replaceAll(" ", "\u00A0")
|
||||
}
|
||||
|
||||
/** @param {String} value */
|
||||
static capitalFirstLetter(value) {
|
||||
if (value.length === 0) {
|
||||
|
||||
@@ -179,7 +179,7 @@ export default class PinEntity extends IEntity {
|
||||
&& (match = this.PinToolTip.match(/\s*(.+?(?=\n)|.+\S)\s*/))
|
||||
) {
|
||||
if (match[1].toLowerCase() === result.toLowerCase()) {
|
||||
return match[1]
|
||||
return match[1] // In case they match, then keep the case of the PinToolTip
|
||||
}
|
||||
}
|
||||
return result
|
||||
|
||||
@@ -2,6 +2,7 @@ import { css, html } from "lit"
|
||||
import Configuration from "../../Configuration.js"
|
||||
import IResizeableTemplate from "../IResizeableTemplate.js"
|
||||
import LinearColorEntity from "../../entity/LinearColorEntity.js"
|
||||
import Utility from "../../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
@@ -42,8 +43,8 @@ export default class CommentNodeTemplate extends IResizeableTemplate {
|
||||
return html`
|
||||
<div class="ueb-node-border">
|
||||
<div class="ueb-node-wrapper">
|
||||
<div class="ueb-node-top">
|
||||
${this.element.entity.NodeComment}
|
||||
<div class="ueb-node-top"
|
||||
.innerText="${Utility.encodeHTMLWhitespace(this.element.entity.NodeComment)}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user