Skip to content

Commit

Permalink
Fixed minor intelligence issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinborner committed Oct 28, 2024
1 parent 551cfb8 commit e9896ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const decodeHTML = (html) => {
};

const encodeHTML = (str) =>
str.replace(/[\u00A0-\u9999<>\&]/g, (i) => "&#" + i.charCodeAt(0) + ";");
str.replace(/[\u00A0-\u9999<>\&\#]/g, (i) => "&#" + i.charCodeAt(0) + ";");

// just basic token parsing
const parseTerm = (str) => {
Expand Down Expand Up @@ -58,6 +58,9 @@ const parseFile = (str) => {
tree.push({ kind: "input", path: matches[1] });
} else if ((matches = line.match(/^:import (.*) (.*)$/))) {
tree.push({ kind: "import", path: matches[1], namespace: matches[2] });
} else if ((matches = line.match(/^:import (.*)$/))) {
const namespace = matches[1].split("/").slice(-1)[0];
tree.push({ kind: "import", path: matches[1], namespace: namespace });
} else if ((matches = line.match(/^:test (\(.*\)) (\(.*\))$/))) {
tree.push({
kind: "test",
Expand Down
2 changes: 1 addition & 1 deletion std/generate_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def list_defs(path, kind, prefix):
res = res + list_defs(import_path, "import", new_prefix)
elif (
line.startswith(":")
or line.startswith("#")
or line.startswith("# ")
or line.strip() == ""
or line[0].isspace()
):
Expand Down

0 comments on commit e9896ef

Please sign in to comment.