mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
Don't add */ for indented syntax loud comments that already have it
This commit is contained in:
parent
bacc380d5b
commit
7454a1b57f
@ -2,6 +2,9 @@
|
||||
|
||||
* Don't deadlock on `/*` comments in the indented syntax.
|
||||
|
||||
* Don't add an extra `*/` to comments in the indented syntax that already have
|
||||
it.
|
||||
|
||||
## 1.0.0-beta.5.2
|
||||
|
||||
* Fix a bug where some colors would crash `compressed` mode.
|
||||
|
@ -23,6 +23,9 @@ class InterpolationBuffer implements StringSink {
|
||||
/// Returns whether this buffer has no contents.
|
||||
bool get isEmpty => _contents.isEmpty && _text.isEmpty;
|
||||
|
||||
/// Returns the substring of the buffer string after the last interpolation.
|
||||
String get trailingString => _text.toString();
|
||||
|
||||
/// Empties this buffer.
|
||||
void clear() {
|
||||
_contents.clear();
|
||||
|
@ -244,7 +244,7 @@ class SassParser extends StylesheetParser {
|
||||
if (_peekIndentation() <= parentIndentation) break;
|
||||
_readIndentation();
|
||||
}
|
||||
buffer.write(" */");
|
||||
if (!buffer.trailingString.trimRight().endsWith("*/")) buffer.write(" */");
|
||||
|
||||
return new LoudComment(buffer.interpolation(scanner.spanFrom(start)));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user