This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new 08196ad fix a few more asdoc output issues
08196ad is described below
commit 08196ad78531848bde19d1fc64b3d8117cc3ef96
Author: Alex Harui <[email protected]>
AuthorDate: Sat Jun 22 23:40:36 2019 -0700
fix a few more asdoc output issues
---
.../internal/codegen/js/royale/JSRoyaleASDocEmitter.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
index 732379a..b0323d6 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
@@ -623,7 +623,11 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter
implements IJSRoyaleEmit
List<String> tagList = project.tags;
asDoc.compile();
write(" \"description\": \"");
- write(asDoc.getDescription());
+ String d = asDoc.getDescription();
+ d = d.replace("\t", " ");
+ d = d.replace("\"", """);
+ d = d.replace("\\", "\\\\");
+ write(d);
write("\"");
Map<String, List<IASDocTag>> tags = asDoc.getTags();
if (tags != null)
@@ -657,7 +661,11 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter
implements IJSRoyaleEmit
if (!firstOne) write(", ");
firstOne = false;
write("\"");
- write(value.getDescription().trim());
+ d = value.getDescription().trim();
+ d = d.replace("\t", " ");
+ d = d.replace("\"", """);
+ d = d.replace("\\", "\\\\");
+ write(d);
write("\"");
}
}
@@ -728,7 +736,6 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter
implements IJSRoyaleEmit
writeNewline(",");
if (def.isDeprecated())
{
- writeNewline(",");
IDeprecationInfo dep = def.getDeprecationInfo();
writeNewline(" \"deprecated\": {");
indentPush();