Skip to content

feat: hr as a tag not data type #80

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

Merged
merged 1 commit into from
Mar 19, 2025
Merged

feat: hr as a tag not data type #80

merged 1 commit into from
Mar 19, 2025

Conversation

shreya-kamble
Copy link
Contributor

No description provided.

@shreya-kamble shreya-kamble requested a review from a team as a code owner March 19, 2025 06:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the rendering of the "hr" element from a styled div with a data-type attribute to a semantic


tag.

  • Update in src/toRedactor.tsx to return an
    tag instead of a styled
  • Update in tests to reflect the new HTML output for the hr element using deep equality assertions
  • Update in expected JSON output to now expect an
    tag

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/toRedactor.tsx Changed the hr rendering from a div with inline styles to a simple
tag
test/fromRedactor.test.ts Updated test assertion to use toStrictEqual for comparing deep JSON structures
test/expectedJson.ts Modified expected JSON to reflect the new
tag rendering
Comments suppressed due to low confidence (1)

src/toRedactor.tsx:108

  • Replacing the styled
    with a bare
    tag may lead to inconsistent styling across browsers. If the previous border styling is required, consider applying a CSS class or inline style to the
    element.
return `<hr>`

Copy link
Contributor

@Jayesh2812 Jayesh2812 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@shreya-kamble shreya-kamble merged commit 2979273 into dev Mar 19, 2025
7 checks passed
@shreya-kamble shreya-kamble deleted the RT-411 branch March 19, 2025 08:54
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