Skip to content

Commit

Permalink
doc: Add comment above x_arg var initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
bbugyi200 committed Sep 4, 2024
1 parent f9014a9 commit 9363301
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/zorg/app/runners/_run_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,18 @@ def _open_rid_link(cfg: OpenActionConfig, rid_link: str) -> int:

def _open_url_link(cfg: OpenActionConfig, url_link: str) -> int:
id_ = url_link[2:-1]

# An optional URL argument can be provided after a colon. These arguments
# should contain NO spaces. They should, instead, use the % symbol to
# represent spaces.
x_arg = ""
if ":" in id_:
id_, x_arg = id_.split(":")
x_arg = x_arg.replace("%", "%20")

notes = note_utils.get_notes_by_id(
cfg.zettel_dir, cfg.database_url, id_, verbose=cfg.verbose
)

if not notes:
print(f"ECHO No notes with found with the ID::{id_} property")
return 1
Expand Down

0 comments on commit 9363301

Please sign in to comment.