Skip to content

Commit

Permalink
chore: trim markdown text
Browse files Browse the repository at this point in the history
  • Loading branch information
richardshiue committed Jan 20, 2025
1 parent aa8c9ba commit a379e24
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class _AppFlowyEditorMarkdownState extends State<_AppFlowyEditorMarkdown> {
void initState() {
super.initState();

editorState = _parseMarkdown(widget.markdown);
editorState = _parseMarkdown(widget.markdown.trim());
scrollController = EditorScrollController(
editorState: editorState,
shrinkWrap: true,
Expand All @@ -65,7 +65,7 @@ class _AppFlowyEditorMarkdownState extends State<_AppFlowyEditorMarkdown> {

if (oldWidget.markdown != widget.markdown) {
editorState.dispose();
editorState = _parseMarkdown(widget.markdown);
editorState = _parseMarkdown(widget.markdown.trim());
scrollController.dispose();
scrollController = EditorScrollController(
editorState: editorState,
Expand Down

0 comments on commit a379e24

Please sign in to comment.