-
Notifications
You must be signed in to change notification settings - Fork 15
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
Regression: conditional substitution [[ ]] is broken #192
Comments
Sorry can you be more detailed in your error description. What exactly is the line you use, what does it do and what do you expect? Also do you use it on a reply email, forward or new? Conditionals that contain address parts cannot be used in "write new" case because all conditional removals have to happen when the editor loads. Also, what version of Thunderbird are you using - I am currently testing with Thunderbird 102.0b4 - the new ESR will be released at the end of this month! |
Thunderbird 78.14.0 Here is my quote header in reply tab:
You are welcome |
I am just testing that how - this is what I get when I paste this quote header - I assume you have "use HTML" switched off: It's actually better to export your settings (this will include quote header and your template) so I don't have to guess them: There is probably a way to do what you want to do using the script tags: |
I tried writing some test script using the JavaScript feature (which is documented here ) but unfortunately there is no safe way to include the variable "reply-to" (because JavaScript sees the "-" as a minus and then assumes there are 2 variables "reply" and "to") - it probably needs some deep patching to work. So I think with the current functions it may sadly not be possible to conditionally leave out the reply-to (if it is set by the original sender). I will do some more tests... |
Of course: I have just sent to you the JSON configuration. |
At first I could not reproduce this with Thunderbird 91.10 and Thunderbird 102.0b8 - cc is left out if it is not set as a mail header. Here is a test quote header is used myself: <br>
<style type="text/css">
#newHeaderBruxane {
background-color:rgba(210,210,210,0.15);
border:1px rgb(210,210,210) solid;
box-shadow: 4px 4px 1px rgba(50,50,50,0.15);
border-radius:3px;
display:inline-block;
font-size: x-small;
padding:0.8em;
}
#newHeaderBruxane b {
color: #990033;
display: inline-block;
font-weight:bold;
min-width: 5em;
max-width:none;
}
</style>
<div id="newHeaderBruxane">
<b>Betreff:</b> %subject% <br>
<b>An:</b> %to% <br>
<b>Von:</b> %from% <br>
[[<b>CC:</b> %cc(name)% <br>]]
<b>Datum: </b>%X:=sent%%A%, %dateshort% %H%:%M%
</div> I believe it is the evil function "replace line breaks with On %X:=sent%%dateformat(d/m/Y H:M:S)% %from(name,bracketMail())% wrote:<br>
> To: %to(name,bracketMail())%[[<br>
> Cc: %cc(name,bracketMail())%]]<br>
> Subject: %subject%<br>
> Message-ID: %Message-ID%<br>
[[> Reply-to: %reply-to(bracketMail())%<br>
]]> |
Another workaround: if you must use "Replace line breaks with
the replacement algorithm has trouble with parsing out the nested Since you are not using an argument such as
When it works: |
The root of the problem is a replacement routine that for some reason only captures the last occurence of the
the second string only shows the last, |
I found a better regular expression for finding the bracketMail() / bracketName() parts within a %function( )% parameter group that was less greedy than %(.*). Instead I am now using Test:
Patched version: |
#192 (comment) 3.12.77 solve issue even with "odd" formed header :-) and Thunderbird 78.14.0 (above versions are apparently incompatible with my MacOS version 10.10.5 :-( ) |
Nice one. I will have to eventually set Technicality on Regex - I also found out on Matrix chat that there is a simple way of making the
looks a lot simpler than my |
Fixed in 3.12.1 on 28/06/2022 |
This appears between version 3.12pre30 and 3.12pre43 at least with
%cc(name,bracketMail())%
The text was updated successfully, but these errors were encountered: