Skip to content

Commit

Permalink
fix bug on quarto attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
jhidding committed Jul 23, 2024
1 parent 26068e9 commit 8486368
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions entangled/hooks/quarto_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, config: Hook.Config):
self.config = config

def on_read(self, code: CodeBlock):
log.debug(f"quarto filter: %s", code)
log.debug("quarto filter: %s", code)

if code.language is None:
return
Expand All @@ -32,8 +32,11 @@ def on_read(self, code: CodeBlock):
if line.startswith(trigger))

attrs = yaml.safe_load(header)
if attrs is None:
return

if "id" in attrs:
code.properties.append(Id(attrs["id"]))
code.properties.extend(Attribute(k, v) for k, v in attrs.items())

log.debug(f"quarto attributes: {attrs}")
log.debug("quarto attributes: %s", attrs)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "entangled-cli"
version = "2.1.0"
version = "2.1.1"
description = "Literate Programming toolbox"
repository = "https://github.com/entangled/entangled.py"
homepage = "https://entangled.github.io/"
Expand Down

0 comments on commit 8486368

Please sign in to comment.