Skip to content

Commit

Permalink
Dont trim before posting (close #1621) (#1622)
Browse files Browse the repository at this point in the history
* Dont trim before posting (close #1621)

* Tweak: do trim end
  • Loading branch information
pfrazee authored Oct 6, 2023
1 parent b74a0e0 commit 8366fe2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/composer/text-input/TextInput.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 8366fe2

Please sign in to comment.