-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, whitespace on the second line of this fragment was incorrectly parsed as 2 `PsiWhiteSpace` elements (" " and "\n"). Now it is parsed as a single " \n" whitespace element. Replace `.` to a space ``` ///.Extra space here: ///. /// fn foo() {} ```
- Loading branch information
Showing
4 changed files
with
59 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/test/resources/org/rust/lang/core/parser/fixtures/complete/doc_comment_whitespace.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/// Extra space here: | ||
/// | ||
/// | ||
fn foo() {} |
21 changes: 21 additions & 0 deletions
21
src/test/resources/org/rust/lang/core/parser/fixtures/complete/doc_comment_whitespace.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FILE | ||
RsFunctionImpl(FUNCTION) | ||
PsiComment(<OUTER_EOL_DOC_COMMENT>) | ||
PsiElement(<DOC_GAP>)('///') | ||
PsiWhiteSpace(' ') | ||
PsiElement(<DOC_DATA>)('Extra space here:') | ||
PsiWhiteSpace('\n') | ||
PsiElement(<DOC_GAP>)('///') | ||
PsiWhiteSpace(' \n') | ||
PsiElement(<DOC_GAP>)('///') | ||
PsiWhiteSpace('\n') | ||
PsiElement(fn)('fn') | ||
PsiWhiteSpace(' ') | ||
PsiElement(identifier)('foo') | ||
RsValueParameterListImpl(VALUE_PARAMETER_LIST) | ||
PsiElement(()('(') | ||
PsiElement())(')') | ||
PsiWhiteSpace(' ') | ||
RsBlockImpl(BLOCK) | ||
PsiElement({)('{') | ||
PsiElement(})('}') |