-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
The title is more of a possible solution to my problem. But let's start with the problem first:
I have a markdown with unnecessary indententation like below:
# Heading 1
- Content 1
- Content 2
# Heading 2
- Some Content
I want to remove the indentation in the content:
diff --git a/before b/after
index 711b728..dbbd285 100644
--- a/before
+++ b/after
@@ -1,6 +1,6 @@
# Heading 1
- - Content 1
- - Content 2
+- Content 1
+ - Content 2
# Heading 2
- - Some Content
+- Some Content
I think I'm almost there, with the following pattern:
comby '#:[heading\n]:[content]#' '<rewrite_template>' markdown.md -matcher txt
Now the content is captured but I am not aware of any way to remove the indententation.
It would be great if there was already such a capability. But if not, the solution I'm thinking of is, to add support for something like nesting rewrite. That is, to allow the captured text (in this case, :[content]) to be processed by another comby command (in this case, the nesting command would replace leading tab/spaces at each line with an empty string).
What is your take?
Metadata
Metadata
Assignees
Labels
No labels