Skip to content

Commit

Permalink
Updated ATN description about #73.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdulcet committed Jan 27, 2023
1 parent a559705 commit accad4b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/texts/en/atnDescription.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
You can enable and disable any features in the options and adjust more settings regarding the behavior of the add-on.


⚠️ Note that context menu does <strong>NOT</strong> currently work in Thunderbird's compose body because of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1716976">Bug 1716976</a>.
⚠️ This extension requires at least Thunderbird 111 for the context menu to work in the compose body due to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1716976">Bug 1716976</a>.

<b>Convert text to any style you want!</b>

Expand Down
3 changes: 3 additions & 0 deletions src/background/modules/AutocorrectHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function createTree(arr) {
* @returns {void}
*/
function applySettings() {
const start = performance.now();
autocorrections = {};

// Add all symbols to our autocorrections map, we want to replace
Expand Down Expand Up @@ -158,6 +159,8 @@ function applySettings() {

symbolpatterns = new RegExp(`(${symbolpatterns})$`, "u");
antipatterns = new RegExp(`(${antipatterns})$`, "u");
const end = performance.now();
console.log(`The new autocorrect settings were applied in ${end - start} ms.`);
}

/**
Expand Down
4 changes: 3 additions & 1 deletion src/content_scripts/autocorrect.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ function outputLabel(anumber, afraction) {

for (const [fraction, value] of Object.entries(fractions)) {
if (Math.abs(fractionpart - value) <= Number.EPSILON * n) {
if (intpart !== 0) {
if (intpart === 0 && number < 0) {
str += "-";
} else if (intpart !== 0) {
str += intpart;
}

Expand Down

0 comments on commit accad4b

Please sign in to comment.