Skip to content

fix(markdoc): remove horizontal rules#227

Merged
noon-dawg merged 9 commits into
mainfrom
remove-horizontal-lines
May 27, 2024
Merged

fix(markdoc): remove horizontal rules#227
noon-dawg merged 9 commits into
mainfrom
remove-horizontal-lines

Conversation

@noon-dawg
Copy link
Copy Markdown
Contributor

@noon-dawg noon-dawg commented Apr 10, 2024

This pull request removes horizontal rules from the readability logic.

@noon-dawg noon-dawg self-assigned this Apr 10, 2024
@noon-dawg noon-dawg added the Type: Docs Improvements or additions to documentation label Apr 10, 2024
@noon-dawg noon-dawg changed the title Add logic to remove horizontal lines fix(markdoc): remove horizontal lines Apr 10, 2024
@noon-dawg noon-dawg changed the title fix(markdoc): remove horizontal lines fix(markdoc): remove horizontal rules Apr 10, 2024
@noon-dawg noon-dawg requested a review from Weetbix May 10, 2024 13:37
Copy link
Copy Markdown
Collaborator

@Weetbix Weetbix left a comment

Choose a reason for hiding this comment

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

Awesome!

Lets add a test case to readability.test.ts?

Comment thread src/readability.ts Outdated
.use(addPeriodsToListItems)
.use(removeJsItems)
.use(removeUnwantedNodeTypes)
.use(removeHorizontalRules)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@noon-dawg Ah wait sorry, you'll see this breaks the existing YAML front matter unit test.

Likely you can swap the order so removeHorizontalRules plugin is used after removeFrontmatter.

Let me know if that doesn't work and we can think of another approach :)

Copy link
Copy Markdown
Contributor Author

@noon-dawg noon-dawg May 27, 2024

Choose a reason for hiding this comment

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

That works!! Thank you 🙏

@noon-dawg
Copy link
Copy Markdown
Contributor Author

(Added a test in 928fb1d)

@noon-dawg noon-dawg requested a review from Weetbix May 27, 2024 11:39
Copy link
Copy Markdown
Collaborator

@Weetbix Weetbix left a comment

Choose a reason for hiding this comment

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

Looking good!

Comment thread src/readability.test.ts Outdated
Comment thread src/readability.test.ts Outdated
Co-authored-by: Weetbix <weetbix_@hotmail.com>
Weetbix
Weetbix previously approved these changes May 27, 2024
@Weetbix Weetbix force-pushed the remove-horizontal-lines branch from 9b74c2c to b05479b Compare May 27, 2024 12:11
@noon-dawg noon-dawg marked this pull request as ready for review May 27, 2024 12:13
@noon-dawg noon-dawg merged commit 0963091 into main May 27, 2024
@noon-dawg noon-dawg deleted the remove-horizontal-lines branch May 27, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants