mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-03-05 00:31:10 +01:00
web: Added completion for <=, >=, and !=
This commit is contained in:
parent
0cdecd35b7
commit
581fd8daa1
@ -277,11 +277,17 @@
|
|||||||
let result = input;
|
let result = input;
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
result = result.replace(
|
result = result.replace(
|
||||||
/(?<html>[<>&]|(\n\s*\}?|\s+))|(?<op>([+\-/*%^!≈]|if|otherwise)|(?<identifier>[^!-@\s_|^⌊⌋⌈⌉≈\[\]\{\}≠≥≤]+(_\d+)?)\(?)/g,
|
/(?<comparison>(!=|[<>]=?))|(?<html>[<>&]|(\n\s*\}?|\s+))|(?<op>([+\-/*%^!≈]|if|otherwise)|(?<identifier>[^!-@\s_|^⌊⌋⌈⌉≈\[\]\{\}≠≥≤]+(_\d+)?)\(?)/g,
|
||||||
(substring, _, html, _2, op, identifier) => {
|
(substring, _, comparison, _2, html, _3, op, identifier) => {
|
||||||
if (html) {
|
if (comparison) {
|
||||||
|
if (substring == "<=") return "≤";
|
||||||
|
if (substring == ">=") return "≥";
|
||||||
|
if (substring == "!=") return "≠";
|
||||||
if (substring == "<") return "<";
|
if (substring == "<") return "<";
|
||||||
if (substring == ">") return ">";
|
if (substring == ">") return ">";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (html) {
|
||||||
if (substring == "&") return "&";
|
if (substring == "&") return "&";
|
||||||
if (substring.startsWith("\n")) {
|
if (substring.startsWith("\n")) {
|
||||||
if (substring.endsWith("}")) {
|
if (substring.endsWith("}")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user