jobisoft / quicktext

An extension for Thunderbird that lets you create templates that can be easily inserted into your own emails.
Mozilla Public License 2.0
184 stars 52 forks source link

Script/Variables shouldn't be count as new line #370

Closed schiessle closed 1 year ago

schiessle commented 1 year ago

First, thanks a lot for this really great and flexible add-on. I couldn't life without it.

I just want to report a small but still annoying issue. If my scripts contain scripts to set a header, etc. they are count as new line in the message body. Example:

Template:

[[HEADER=TO|foo@example.com]]
Hello,

this is my fancy template.

Cheers,
Björn

Result when I apply the template to a mail:


Hello,

this is my fancy template.

Cheers,
Björn

There is one empty line above the "Hello", If I add more scripts the new lines add up and no matter where you put it (beginning or end of the template), this newlines are annoying.

The add-one should completely ignore the lines with the scripts/variables when filling in the body of the message.

jobisoft commented 1 year ago

I cannot remove newlines from the template, but you can almost fix this by not adding one:

[[HEADER=TO|foo@example.com]]Hello,

this is my fancy template.

Cheers,
Björn

It could be that v5.6 adds a space, but I made sure this does not happen in the upcoming WebExt version: https://github.com/jobisoft/quicktext/commit/6015dbd1c30d96d11e75969f226c1f46810f1bb7

The upcomming WebExt version also allows to set from and subject headers. If helpful, it is now very easy to allow arbitrary x-headers as well (without scripts).