Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZCO-136] Fix failing "append below headline" for entirely empty sections #73

Closed
2 tasks done
czottmann opened this issue Aug 4, 2023 · 3 comments
Closed
2 tasks done
Labels
bug Something isn't working linear

Comments

@czottmann
Copy link
Owner

czottmann commented Aug 4, 2023

Bug report made by a customer: given this note …

## Section 1
## Section 2
## Section 3

… attempting to insert text below ## Section 1 fails. (I suspect it's because the related regex is looking for new lines.)

  • fix appending 📅 2023-08-07 ✅ 2023-08-07
  • fix prepending 📅 2023-08-07 ✅ 2023-08-07

ZCO-136

@czottmann czottmann added the bug Something isn't working label Aug 4, 2023
@czottmann czottmann added this to the Actions URI 1.2.4 milestone Aug 6, 2023
czottmann added a commit that referenced this issue Aug 7, 2023
     with entirely empty sections (#73)
czottmann added a commit that referenced this issue Aug 7, 2023
@czottmann
Copy link
Owner Author

Fixed, will be deployed in 1.2.4.

@czottmann czottmann added linear and removed linear labels Sep 17, 2023
@czottmann czottmann changed the title Fix failing "append below headline" for entirely empty sections [ZCO-136] Fix failing "append below headline" for entirely empty sections Sep 17, 2023
@psycho-baller
Copy link

I am facing this issue for both appending and prepending. I tried several ways but the content would always just go to the bottom or top

I tried:

  • '&below-headline="#### Header"'
  • '&below-headline=####%20Header'
  • '&below-headline=#### Header'

I also placed several newlines above and below it and that also didn't resolve it

For reference this is the full uri:

obsidian://actions-uri/daily-note/append?create-if-not-found=true&ensure-newline=true&content=Hey%20mom!&vault=Obsidian&below-headline=#### Header

@czottmann
Copy link
Owner Author

Hi @psycho-baller, that's the not the same issue. Your URL's below-headline parameter is not encoded, and mangles the URL as a plaintext # has a different meaning. (Basically, by using the plaintext # tells Actions URI (or any URL parser, for that matter) that the URL address ends right before that particular character.)

Try this instead:

obsidian://actions-uri/daily-note/append?create-if-not-found=true&ensure-newline=true&content=Hey%20mom!&vault=Obsidian&below-headline=%23%23%23%23%20Header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linear
Projects
None yet
Development

No branches or pull requests

2 participants