Skip to content

feat(multi-line): Allow multi-lines in Range-cards include empty lines. - #56

Open
ikozhma wants to merge 1 commit into
linanwx:masterfrom
ikozhma:feat-ranged-multi-line-include-empty-lines
Open

feat(multi-line): Allow multi-lines in Range-cards include empty lines.#56
ikozhma wants to merge 1 commit into
linanwx:masterfrom
ikozhma:feat-ranged-multi-line-include-empty-lines

Conversation

@ikozhma

@ikozhma ikozhma commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Before:
Range card didn't allow multiline patterns to include empty lines
Example1:

#Q
line1

line2
?
line3

line4
#/Q

The parsed card will be line2 ? line3 while line1 and line4 are cut out.

Now all lines are included and the card will look like exactly as it is written.
I checked that this change interacts gracefully with sub-cards splitters.
As they have priority over multi-lining.

@ikozhma ikozhma changed the title feat(multi-line): Multi-lines in Range-cards may include empty lines. feat(multi-line): Allow multi-lines in Range-cards include empty lines. Oct 29, 2025
@linanwx

linanwx commented Nov 23, 2025

Copy link
Copy Markdown
Owner

Hi, thanks for the PR!

I have a concern about backward compatibility.

I tried the case:

#Q  #AOSR/5n2c4
a
b

c
? #AOSR/5n2c4/m/7mvf
d

e
? #AOSR/5n2c4/m/3pgr
f
#/Q

The old implementation found 2 patterns, but the new one found 1 pattern.

I may need some time to think about this PR. If you have any ideas, feel free to talk.

@ikozhma

ikozhma commented Nov 26, 2025

Copy link
Copy Markdown
Contributor Author

@linanwx
The new one also finds 2 patterns if you turn on the feature "Allow empty line as splitter". It seems you definetely want this empty line to be a splitter in your example.
Or you could manually put *** splitter between the patterns so that they are treated as separate.

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

Successfully merging this pull request may close these issues.

2 participants