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

Add a INSERT BEFORE/AFTER option for lit blocks #9

Open
eliemichel opened this issue Apr 15, 2023 · 0 comments
Open

Add a INSERT BEFORE/AFTER option for lit blocks #9

eliemichel opened this issue Apr 15, 2023 · 0 comments

Comments

@eliemichel
Copy link
Owner

The difference with INSERT IN is when replacing blocks:

INSERT IN

```{lit} Block A
foo
```

```{lit} Block B (insert in A after "foo")
bar
```

```{lit} Block A (replace)
foo
fuu
```

When tangling Block A this gives:

foo
fuu

The content of Block B is fully discarded.

INSERT AFTER

```{lit} Block A
foo
```

```{lit} Block B (insert after A)
bar
```

```{lit} Block A (replace)
foo
fuu
```

When tangling Block A this gives:

foo
fuu
bar

The content of Block B is still inserted after Block A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant