Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space / line break issue when pasting text copied from/to firefox #1502

Closed
xebico opened this issue May 17, 2018 · 13 comments
Closed

space / line break issue when pasting text copied from/to firefox #1502

xebico opened this issue May 17, 2018 · 13 comments

Comments

@xebico
Copy link

xebico commented May 17, 2018

When copying blocks of text from web pages, Typora will seemingly randomly insert extra spaces between words. Looking at the HTML code of the web pages I copied from, there is no space.

For example, copying this paragraph from https://github.com/typora/typora-issues:

Typora is commercial software (not open source), but is free during beta. Typora on GitHub supports collaboration between its developer, Abner Lee, and its user community, providing a place to transparently report issues, collect feedback and discuss future direction. It also provides open source resources for user customization of themes.

When pasting into Typora, an extra space in inserted between and and discuss and between for and user.

image

Pasting that same text into another editor (e.g., Notepad++) does not add those spaces. Viewing the source code in Typora simply shows there are two spaces; there's not extraneous code.

I can repeat this from many websites and using any Typora theme. I'm using Typora 0.9.51 on Windows 10.

@GreatBahram
Copy link

This is not true on Linux.

@xebico
Copy link
Author

xebico commented May 18, 2018

More info: It appears to happen about every 70 characters, depending on where the nearest space is.

@abnerlee
Copy link
Contributor

This works fine in my test -- paste will results two paragraph, not quite like your screenshot.

@xebico Which browser did you use ?

@xebico
Copy link
Author

xebico commented May 21, 2018

I'm using the latest Firefox -- 60.0.1. And what d'ya know, it doesn't happen in Chrome. I never suspected it could be the browser. Duh!

@xebico xebico closed this as completed May 21, 2018
@xebico xebico reopened this May 23, 2018
@xebico
Copy link
Author

xebico commented May 23, 2018

I've been experimenting. The extra spaces only appear when using the combination of Firefox and Typora. I tried pasting into Word, Notepad, Notepad++, and even a browser window. No extra spaces. It only happens in Typora.

I tried copying from various Web pages, too. Same thing, so it's not an issue of hidden characters. The extra spaces appear in Typora at the nearest space to every 70 characters.

What could be doing this? It's making me nuts!

I made an HTML file with no formatting. Just numbers. Here's the source:
source

Here's what it looks like in Firefox:
ff

And here's what happens when pasting into Typora:
typora

@coiby
Copy link

coiby commented Feb 14, 2019

In my case, copy the paragraph from https://github.com/typora/typora-issues opened by firefox:

Typora is commercial software (not open source), but is free during beta. Typora on GitHub supports collaboration between its developer, Abner Lee, and its user community, providing a place to transparently report issues, collect feedback and discuss future direction. It also provides open source resources for user customization of themes.

becomes

image
i.e., an extra newline instead of an extra space is inserted between and and discuss and between for and user

@xebico
Copy link
Author

xebico commented Feb 15, 2019

Yeah, I'm still having the problem with both Firefox and Thunderbird (which isn't a surprise).
Even odder, if I try to search for two spaces and replace them with one space, Typora doesn't find any. (If I paste from Typora into Notepad, though, Notepad does find the two spaces.)

This only happens with Typora. Pasting from Firefox/T'bird into any other program doesn't add those extra spaces.

So yeah, something is definitely wonky.

@abnerlee abnerlee changed the title Extra space(s) inserted when pasting text copied from websites space / line break issue when pasting text copied from firefox Apr 18, 2019
@abnerlee abnerlee changed the title space / line break issue when pasting text copied from firefox space / line break issue when pasting text copied from/to firefox May 3, 2020
@abnerlee
Copy link
Contributor

abnerlee commented May 4, 2020

I have tried with Firefox, but seems not reproducible any more

@abnerlee abnerlee closed this as completed May 4, 2020
@xebico
Copy link
Author

xebico commented May 4, 2020

Honest and for true, it's still happening with the latest version of both Typora and Firefox! Here's a snippet from the New York Times. Every 70 characters Typora adds an extra space. I'm not crazy — honest! :)
Note: This does not happen with Chrome, only Firefox.

1-nyt
2-typora
3-typora

@abnerlee abnerlee reopened this May 7, 2020
@abnerlee
Copy link
Contributor

abnerlee commented May 7, 2020

So, the extra line break are gone. While extra spaces are still there?

@xebico
Copy link
Author

xebico commented May 7, 2020

I never had a problem with line breaks — it was always just an extra space every 70 characters. And yep, those extra spaces keep showing up. Crazy, huh?

@maaldheefee
Copy link

I've the same issue. Only with Firefox and only when pasting with formatting. But if I paste as plain text, no extra spaces are inserted.

@maaldheefee
Copy link

I checked the clipboard with clipview

image

Firefox breaks the lines so there's a space and end of line character.

Here's the same thing copied from Edge.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants