|
|
Split out the bits of JavaScript rendering code relating to deciding
whether spaces or newlines are required/allowed between tokens.
Ihab pointed out that the side-by-side renderer is splitting lines in
ways that allow for semicolons to be inserted after return and throw.
This consolidates the code related to that. In another CL I will
rewrite existing renderers to use this consistently, and in a third, I
will rewrite JsPrettyPrinter to do better formatting. This CL is
simple and semantics preserving. The second will be a more
substantial change but semantics preserving. The third will not be
semantics preserving.
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+677 lines, -434 lines) |
Patch |
 |
M |
src/com/google/caja/parser/js/Minify.java
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
src/com/google/caja/parser/js/Parser.java
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
A |
src/com/google/caja/render/Indent.java
|
View
|
|
1 chunk |
+64 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/com/google/caja/render/Indenter.java
|
View
|
|
1 chunk |
+291 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/render/JsPrettyPrinter.java
|
View
|
1
2
3
|
4 chunks |
+13 lines, -368 lines |
0 comments
|
Download
|
 |
A |
src/com/google/caja/render/Spacer.java
|
View
|
|
1 chunk |
+230 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/opensocial/DefaultGadgetRewriterTest.java
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/opensocial/example-rewritten.xml
|
View
|
1
2
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/opensocial/service/CajolingServiceTest.java
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/js/ParserTest.java
|
View
|
1
2
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/js/rendergolden1.txt
|
View
|
1
2
|
4 chunks |
+4 lines, -12 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/js/rendergolden2.txt
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/js/rendergolden4.txt
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/js/rendergolden5.txt
|
View
|
1
2
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/js/rendergolden9.txt
|
View
|
1
2
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/CssCompilerTest.java
|
View
|
1
2
|
3 chunks |
+12 lines, -1 line |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/DomProcessingEventsTest.java
|
View
|
1
2
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/HtmlSanitizerTest.java
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/stages/OpenTemplateStageTest.java
|
View
|
1
2
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/stages/RewriteHtmlStageTest.java
|
View
|
1
2
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/render/JsPrettyPrinterTest.java
|
View
|
1
2
|
6 chunks |
+25 lines, -13 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/render/sbs-golden.js
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/util/CajaTestCase.java
|
View
|
1
2
|
2 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
Total messages: 7
|