Replace heading with patch #164
Replies: 5 comments
-
As some clarification, this would allow the user to patch
with a new section entirely.
|
Beta Was this translation helpful? Give feedback.
-
That's an interesting idea I hadn't considered! I'd be interested in reviewing a PR adding a feature like that. |
Beta Was this translation helpful? Give feedback.
-
I'm a long time data scientist and coder/scripter/lurker of Github, but have never actually contributed. I know shame on me. JS/TS etc is a newer language for me as well so I need to learn things like bundling, testing plugins, etc. I like to learn though! It might take awhile for me to have any progress as I have a 1mo baby at home, too. |
Beta Was this translation helpful? Give feedback.
-
Since this would involve changes to both the Obsidian-local-rest-api repo as well as the dependency of the markdown-patch, how would you suggest a PR be made, should I make the PR for the markdown-patch repo first, then we could test it raw there and if accepted, then move on to a PR for this repo? |
Beta Was this translation helpful? Give feedback.
-
Let's see how this looks, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello I've been looking through this repo and your https://github.com/coddingtonbear/markdown-patch/tree/main repo.
I think a very small change could provide a useful addition is to be able to replace a header with the content if desired.
A simple flag for the instructions from this repo, something like replaceHeader = true.
A slight modification to the replaceText return in the patch module of markdown-patch:
so that the first part of the join if the flag is set is
document.slice(0, target.marker.start)
instead of content.start.
I'm not sure if there's already a trick for this, but I couldn't find it if so.
Beta Was this translation helpful? Give feedback.
All reactions