aboutsummaryrefslogtreecommitdiff
path: root/tooling/pogen
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-02-22 11:49:13 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-02-22 11:49:13 +0100
commit89815175a0c084f27eb5e150f59c458a74774242 (patch)
treea03cda4ea5a30685417bfe04fcc17ecb5b10fd55 /tooling/pogen
parent66d05038fdac611ce474ffe047c28524dad0c4ad (diff)
more i18n/spacing fixes
Diffstat (limited to 'tooling/pogen')
-rw-r--r--tooling/pogen/pogen.js6
-rw-r--r--tooling/pogen/pogen.ts6
2 files changed, 12 insertions, 0 deletions
diff --git a/tooling/pogen/pogen.js b/tooling/pogen/pogen.js
index ed634ef0d..203ed442c 100644
--- a/tooling/pogen/pogen.js
+++ b/tooling/pogen/pogen.js
@@ -190,6 +190,12 @@ function processFile(sourceFile) {
var e = childNode;
var s = e.getFullText();
var t = s.split("\n").map(trim).join(" ");
+ if (s[0] === " ") {
+ t = " " + t;
+ }
+ if (s[s.length - 1] === " ") {
+ t = t + " ";
+ }
fragments.push(t);
}
case ts.SyntaxKind.JsxOpeningElement:
diff --git a/tooling/pogen/pogen.ts b/tooling/pogen/pogen.ts
index 391843912..98ecdf785 100644
--- a/tooling/pogen/pogen.ts
+++ b/tooling/pogen/pogen.ts
@@ -213,6 +213,12 @@ export function processFile(sourceFile: ts.SourceFile) {
let e = childNode as ts.JsxText;
let s = e.getFullText();
let t = s.split("\n").map(trim).join(" ");
+ if (s[0] === " ") {
+ t = " " + t;
+ }
+ if (s[s.length - 1] === " ") {
+ t = t + " ";
+ }
fragments.push(t);
}
case ts.SyntaxKind.JsxOpeningElement: