Skip to content

preserve text formatting#52

Merged
selfint merged 5 commits intomainfrom
51-preserve-text-formatting-in-ui
Mar 5, 2023
Merged

preserve text formatting#52
selfint merged 5 commits intomainfrom
51-preserve-text-formatting-in-ui

Conversation

@selfint
Copy link
Copy Markdown
Owner

@selfint selfint commented Mar 2, 2023

No description provided.

@selfint selfint linked an issue Mar 2, 2023 that may be closed by this pull request
@selfint
Copy link
Copy Markdown
Owner Author

selfint commented Mar 2, 2023

Figure out how to handle "double newline".

When a block appears right after a newline, a redundant newline is inserted between the actual newline, and the one created by
the block. Maybe just checking if the previous byte is a newline, and if so removing it, is good enough?

@selfint
Copy link
Copy Markdown
Owner Author

selfint commented Mar 4, 2023

Trimming whitespace seems to work.

Another problem, when we preserve text whitespace, indentation is all wrong due to margins/padding. Maybe disabling them, and adding the previous whitespace of each Tree, to the Tree, will work?

@selfint
Copy link
Copy Markdown
Owner Author

selfint commented Mar 4, 2023

Maybe boxes aren't the way to go here?

Can we just copy how the text appears in the real file, and draw boxes dynamically around relevant parts?

For example:

+--------+-------------------+-+
| export | function foo() {} | |
+--------+-------------------+-+

@selfint selfint merged commit 22ac61e into main Mar 5, 2023
@selfint selfint deleted the 51-preserve-text-formatting-in-ui branch March 5, 2023 11:25
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.

preserve text formatting in ui

1 participant