I'm looking for a sed
command that replace a part of the target.md file
identified by the <!-- start:block -->
and <!-- end:block -->
markers.
This part of the file has to be replaced either with replaceA.md or replaceB.md, but the marker have to be there at the end, so we can start the process again.
You can clone this gist to get the files:
git clone https://gist.github.com/01f134ee6e22c52066b9089094ec31ef.git replace-between-markers
Some text before
<!-- start:block -->
These lines should
be replaced from the
content of another file
(replace.md).
<!-- end:block -->
Some text after
Yes! Replacement text
without the 2 markers
in it.
<!-- start:block -->
Yes! Replacement text
with the 2 markers
in it.
<!-- end:block -->