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

Allow list items etc. to terminate paragraphs #411

Merged
merged 6 commits into from
Jan 16, 2022
Merged

Allow list items etc. to terminate paragraphs #411

merged 6 commits into from
Jan 16, 2022

Conversation

ikonst
Copy link
Contributor

@ikonst ikonst commented Dec 11, 2021

This is another stab at #256. Unlike #291, I'm matching the paragraph imperatively rather than with a regex.

Fixes #256.

index.tsx Outdated
break
}
match += line + '\n'
if (/^\s*$/.test(line)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be equivalent?

Suggested change
if (/^\s*$/.test(line)) {
if (!line.trim()) {

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trim appears to be significantly faster, so let's go with that

index.tsx Outdated Show resolved Hide resolved
@ikonst
Copy link
Contributor Author

ikonst commented Jan 11, 2022

@probablyup bump!

@quantizor
Copy link
Owner

Just wanted to quickly say I haven't forgotten about this! I've had COVID since the new year and am finally starting to feel normal again. Should have some time for OSS work this weekend.

index.tsx Outdated Show resolved Hide resolved
index.tsx Outdated
break
}
match += line + '\n'
if (/^\s*$/.test(line)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trim appears to be significantly faster, so let's go with that

index.tsx Outdated Show resolved Hide resolved
index.tsx Outdated Show resolved Hide resolved
index.tsx Outdated Show resolved Hide resolved
index.tsx Outdated Show resolved Hide resolved
index.tsx Outdated Show resolved Hide resolved
Copy link
Owner

@quantizor quantizor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your patience on this!

@quantizor quantizor merged commit a313ff2 into quantizor:main Jan 16, 2022
@ikonst ikonst deleted the paragraph-newline branch January 16, 2022 18:56
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.

Lists should not require blank line before them
2 participants