[geary/geary-0.12] Handle font-family strings containing both single and double quotes.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/geary-0.12] Handle font-family strings containing both single and double quotes.
- Date: Sat, 2 Dec 2017 09:47:17 +0000 (UTC)
commit 6e4b9d2579649fec8d89f8451c903ccb16ff6d6b
Author: Michael James Gratton <mike vee net>
Date: Thu Nov 16 10:48:42 2017 +1100
Handle font-family strings containing both single and double quotes.
Fixes a failing unit test with WebKitGTK 2.18.
* ui/composer-web-view.js (EditContext::init): Check for and strip both "
and ' from start and end of font-family string.
ui/composer-web-view.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/ui/composer-web-view.js b/ui/composer-web-view.js
index a0ab097..63cea8e 100644
--- a/ui/composer-web-view.js
+++ b/ui/composer-web-view.js
@@ -616,7 +616,7 @@ EditContext.prototype = {
let styles = window.getComputedStyle(node);
let fontFamily = styles.getPropertyValue("font-family");
- if (fontFamily.charAt() == "'") {
+ if (["'", "\""].indexOf(fontFamily.charAt()) != -1) {
fontFamily = fontFamily.substr(1, fontFamily.length - 2);
}
this.fontFamily = fontFamily;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]