Closed vitaly-rudenko closed 4 months ago
@vitaly-rudenko Thanks for the report, and your offer, and I agree, this looks like a glaring oversight. I think option 1 is the better one, I'll look into it later today.
Apologies for the delay, and thank you for the offer, I do appreciate it! It's just that I work in cycles as I have more than one project, and I work on them in focussed blocks, and currently it's Action URI's time again. (I'm preparing the 1.6 release right now.)
I've implemented a new optional parameter for /note/append
/ and /note/prepend
: if-headline-missing=add-headline|error|skip
. If below-headline=
is used, and the requested headline is missing, the following behavior is available:
if-headline-missing=add-headline
will add the headline to the end of the document before adding the append/prepend stringif-headline-missing=error
will return an error. That's the new default in v1.6.if-headline-missing=skip
will ignore the missing headline and do nothing, which is the pre-v1.6 standard behavior.Cool?
The changes will be live in the upcoming v1.6, later this week.
Hi! Thanks for building this amazing plugin.
Option 'below-headline' is very useful, although it seems that if no section was found with that headline, the operation still succeeds and file remains unchanged.
There are two options that I think would work well in this situation:
I'd be happy to contribute if you don't have the capacity, but I first wanted to know which option sounds better (or if there's an alternative solution)