Skip to content

Commit

Permalink
debug engine, fix default opens-ctx value
Browse files Browse the repository at this point in the history
  • Loading branch information
Sup2point0 committed Apr 8, 2024
1 parent 7454f69 commit bcf03b4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}"
"cwd": "${fileDirname}"
}
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"python.testing.pytestArgs": [
"tests"
"tests/quarkify.py"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
Expand Down
4 changes: 3 additions & 1 deletion quarkdown/quarkify.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def extract_quarks(text: str) -> dict:
with open(os.path.join(root, "resources/tokens-schema.json")) as file:
defaults = json.load(file)["properties"]["tokens"]["items"]["defaultSnippets"][0]["body"]

context: list[dict] = [defaults]
context: list[dict] = [
textualise.tokenise({"opens-ctx": "~"}, defaults)
]
flags = {}

# TODO splitting twice is really, really slow, how do we optimise this
Expand Down
2 changes: 1 addition & 1 deletion quarkdown/resources/tokens-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"description": "All default configurations for a token.",
"body": {
"shard": "~",
"opens-ctx": "~",
"opens-ctx": null,
"regex-open": " ",
"required-ctx": null,
"required-idx": null,
Expand Down
2 changes: 1 addition & 1 deletion tests/manual.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
sys.path[0] = "/".join(sys.path[0].split("/")[:-1])

from . import quarkify
import quarkify


quarkify.test_data_single()
Expand Down

0 comments on commit bcf03b4

Please sign in to comment.