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

feat: support squeezing soft breaks #477

Merged
merged 3 commits into from
Jun 6, 2024
Merged

feat: support squeezing soft breaks #477

merged 3 commits into from
Jun 6, 2024

Conversation

robertu7
Copy link
Contributor

@robertu7 robertu7 commented Jun 5, 2024

No description provided.

@robertu7 robertu7 requested a review from a team as a code owner June 5, 2024 14:42
@robertu7 robertu7 linked an issue Jun 5, 2024 that may be closed by this pull request
2 tasks
@robertu7 robertu7 requested review from gary02, byhow and wlliaml June 5, 2024 14:43
Copy link

@byhow byhow left a comment

Choose a reason for hiding this comment

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

mostly nitpicking

import {
rehypeParseOptions,
rehypeSanitizeOptions,
rehypeStringifyOptions,
} from './options'

export interface SanitizeHTMLOptions {
maxEmptyParagraphs?: number
maxHardBreaks?: number
Copy link

Choose a reason for hiding this comment

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

imo not the best practice to set to number? instead of defaults (-1). In this case we can also avoid typechecking

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea, but these options are optional and this squeeze plugin will be disabled by default (undefined).

src/transformers/lib/rehypeSqueezeBreaks.ts Outdated Show resolved Hide resolved
@robertu7 robertu7 merged commit aa64312 into develop Jun 6, 2024
2 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feat/journal branch June 6, 2024 03:12
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.

Revise line breaks normalization on comment
2 participants