Dont trim before posting (close #1621) (#1622)

* Dont trim before posting (close #1621)

* Tweak: do trim end
zio/stable
Paul Frazee 2023-10-05 19:08:20 -07:00 committed by GitHub
parent b74a0e0fe2
commit 8366fe2c4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ export async function post(store: RootStoreModel, opts: PostOpts) {
| undefined
let reply
let rt = new RichText(
{text: opts.rawText.trim()},
{text: opts.rawText.trimEnd()},
{
cleanNewlines: true,
},

View File

@ -119,7 +119,7 @@ export const TextInput = React.forwardRef(function TextInputImpl(
onUpdate({editor: editorProp}) {
const json = editorProp.getJSON()
const newRt = new RichText({text: editorJsonToText(json).trim()})
const newRt = new RichText({text: editorJsonToText(json).trimEnd()})
newRt.detectFacetsWithoutResolution()
setRichText(newRt)