Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Oct 25, 2024

Describe your changes

Migrate the StreamlitMarkdown component from class-based to functional.

Testing Plan

  • No logical changes, no tests required.

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@lukasmasuch lukasmasuch added security-assessment-completed Security assessment has been completed for PR impact:internal PR changes only affect internal code change:refactor PR contains code refactoring without behavior change labels Oct 25, 2024
Comment on lines -615 to -618
throw Object.assign(new Error(), {
name: "Error parsing Markdown or HTML in this string",
message: <p>{source}</p>,
stack: null,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This doesn't really seem necessary since the markdown component is already wrapped by two error boundaries, one around ReactMarkdown and another one in ElementNodeRenderer.

@lukasmasuch lukasmasuch marked this pull request as ready for review October 25, 2024 07:27
@lukasmasuch lukasmasuch merged commit 5ff654f into develop Oct 28, 2024
@lukasmasuch lukasmasuch deleted the refactor/modernize-markdown-component branch October 28, 2024 05:56
edegp pushed a commit to edegp/streamlit that referenced this pull request Jan 19, 2025
## Describe your changes

Migrate the StreamlitMarkdown component from class-based to functional.

## Testing Plan

- No logical changes, no tests required.

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:refactor PR contains code refactoring without behavior change impact:internal PR changes only affect internal code security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants