Skip to content

Commit 2a4f01f

Browse files
committed
Add change log and minor cosmetic changes
1 parent c458c49 commit 2a4f01f

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "bugfix",
3+
"description": "Fixed a bug in the formatter that was removing newlines escapes",
4+
"pull_requests": [
5+
"[#3068](https://github.com/smithy-lang/smithy/pull/3068)"
6+
]
7+
}

smithy-syntax/src/main/java/software/amazon/smithy/syntax/CapturedToken.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private CapturedToken(
4747
int endColumn,
4848
CharSequence lexeme,
4949
String stringContents,
50-
String formattedTextBlockContents,
50+
String textBlockContents,
5151
Number numberValue,
5252
String errorMessage
5353
) {
@@ -66,7 +66,7 @@ private CapturedToken(
6666
} else {
6767
this.stringContents = stringContents;
6868
}
69-
this.textBlockContents = formattedTextBlockContents;
69+
this.textBlockContents = textBlockContents;
7070

7171
if (errorMessage == null && token == IdlToken.ERROR) {
7272
this.errorMessage = "";
@@ -95,7 +95,7 @@ public static final class Builder implements SmithyBuilder<CapturedToken> {
9595
private int endColumn;
9696
private CharSequence lexeme;
9797
private String stringContents;
98-
private String formattedTextBlockContents;
98+
private String textBlockContents;
9999
private String errorMessage;
100100
private Number numberValue;
101101

@@ -113,7 +113,7 @@ public CapturedToken build() {
113113
endColumn,
114114
lexeme,
115115
stringContents,
116-
formattedTextBlockContents,
116+
textBlockContents,
117117
numberValue,
118118
errorMessage);
119119
}
@@ -164,7 +164,7 @@ public Builder stringContents(String stringContents) {
164164
}
165165

166166
public Builder textBlockContents(String formattedTextBlockContents) {
167-
this.formattedTextBlockContents = formattedTextBlockContents;
167+
this.textBlockContents = formattedTextBlockContents;
168168
return this;
169169
}
170170

@@ -291,7 +291,6 @@ public CharSequence getLexeme() {
291291
*
292292
* @return Returns the string contents of the lexeme, or null if not a string|text block|identifier.
293293
*/
294-
// Can we capture the formatted block as well?
295294
public String getStringContents() {
296295
return stringContents;
297296
}

0 commit comments

Comments
 (0)