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