If you have a problem with the add-on remove linebreaks / do word wrap (fork for 2.1) post in this thread. This way I get notified. If you make a new thread I will likely miss it. If you post your comment, question or bug report on ankiweb as a review I won’t get notified. You really should post in this thread.
Doesn’t work with anki 2.1.43 (and also 2.1.42 i think?). When i press ctrl+d it just delete the text (it doesn’t give any error though)
it actually broke with .41. I’m still on older versions so if you find a broken add-on let me know. I just uploaded a small update which should make it work again on the latest versions. Could you test it and let me know if it works.
Thank you very much! Now it works if i manually press the button, but it does nothing with the shortcut alt+D…
The default shortcut is working for me. Have you tried another shortcut. Your custom shortcut “Alt+D” maybe conflicts with another add-on. “Alt+D” is easy to press and should be “popular”, e.g. my “Cut/Copy from Editor …” uses this by default (iirc).
I changed it to alt+r and now it works! Thank you very much!
Doesn’t work on qt6
When loading ‘remove linebreaks do word wrap’:
Traceback (most recent call last):
File “aqt.addons”, line 239, in loadAddons
File “C:\Users\X\AppData\Roaming\Anki2\addons21\2028179508_init_.py”, line 1, in
from . import remove_linebreaks
File “C:\Users\X\AppData\Roaming\Anki2\addons21\2028179508\remove_linebreaks.py”, line 77, in
aqt.editor._html = jsfunc_remove_breaks + aqt.editor._html
AttributeError: module ‘aqt.editor’ has no attribute ‘_html’
@gustavosmen : should be broken due to changes in the editor in all qt versions … it’ll take some time until i have a new version.
I don’t know if it’s necessary, as your other add-on works as a suitable replacement.
https://ankiweb.net/shared/info/356095608
Anyway, thank you for your awesome work, as ever.
Hello. Thanks for this addon, its very useful. Man, I want to know if is possible select all my cards and apply this command to all them. Thank you.
@Schmitz1: My add-on does not support it. I added it to the bottom of my todo list so I’ll possibly never find the time.
maybe the built-in find and replace functionality could help, Browsing - Anki Manual But that would be complicated.
No problem!! Its very useful anyway. Thank your for answer.
Hi man
I really wanted wanted to thank you about the add on but can you please update the add on since it is really essential for many of us.
Just as a(nother) workaround for y’all, you can do the same in a text editor like Notepad++.
- New document
- Paste your text.
- Hit Ctrl+H to open the Replace window.
- Set Search mode to Extended
Find what: -\r\n
- Make sure the
Replace with:
field is completely empty - Hit Replace All
Find what: \r\n
- Make sure the
Replace with:
field contains one single space character and nothing else - Hit Replace All
- Copy+paste the result into Anki.
I am experiencing unexpected behavior.
When my cursor is in a list (HTML EXAMPLE, so my point is easier to follow, but only the normal editor is used):
<ul>
<li>A</li>
<li>B</li> <- CURSOR HERE
</ul>
and press remove linebreaks a new empty list item will get added:
<ul>
<li></li> <- UNWANTED
<li>A</li>
<li>B</li>
</ul>
Can anybody confirm it also happens on their machine?
I followed your instruction and can confirm that the same happens here.
I would love to see this fixed @ijgnd
thanks for this clear bug report and the verification. I will look into it. but unfortunately no timeline due to a lack of time.
Sorry for asking again. But is there any progress so far? It has been over a month.
Unfortunately I’m still pretty busy. So I guess the timeline is a couple of months or maybe there won’t be a fix at all. I’d prefer to give you a different answer but there’s also my regular life … If someone else posts a fix I’m happy to merge it …