Closed 4SoG closed 5 years ago
Right! Sorry again for how sloppy this addon was written (intended for one time use, haha).
I'll fix this/make this configurable.
Yeah, about strip_html_permanently
, I'm wondering if I should just remove it completely. Feels like a dangerous feature and it's not really related to note merging anyway.
Thanks again for reporting this so thoroughly! :heart_eyes: Testing and feedback is really valuable.
Happy to help any way I can!
That's great to hear, configurable separators would be a neat option. As for strip_html_permanently
, you're right that it seems unnecessary and may even be harmful sometimes, but maybe setting the default value to False
and a warning would be enough, some users might like/need this functionality.
And thank you one more time for the addon, it's already saved me a lot of time! I'm awfully grateful that you're willing to share and support it. Thanks! :1st_place_medal: :clap:
The latest commit should fix the linebreaks (and you can set another string with self.merge_join_string
) :)
As for strip_html_permanently
you might be right, but I don't see the use case in this addon (one could write a much much simpler addon doing the same thing). I think here it is only dangerous. I will remove it and write a strip html addon if anyone ever requests it ;)
I hope I can add some more functionality to this addon (and perhaps port it to anki 2.1). Would be great if you could also test that it works as intended some time then :)
Line breaks that should separate merged content:
don't work for me for some reason (Anki Version 2.0.52 Qt 4.7.4 PyQt 4.8.6 on Windows 10 Version 1809 (OS Build 17763.615) 32 bit.). Field values are only separated with a space.
To get line breaks I have replaced
with
in line 257
and
with
in line 262.
Note: this has been tested with
and I'm not sure if setting
self.strip_html_permanently = True
might conflict with those<br>
tags. If yes, there could be another separator used instead of a line break, e.g.|
. (The separator could also be user-configurable, but this would require code alterations too complex for a person with zero knowledge of Python, like myself...)Hope this helps in case someone else has a similar issue or would like to use a different separator.