Skip to content

Commit c52e451

Browse files
drstrangeswasabeef
andauthored
Fix: _Statement.toDartDocString generates different strings on Windows and Ubuntu. (#156)
* Fix: _Statement.toDartDocString Fixed _Statement.toDartDocString, that was generated different strings on Windows and Ubuntu. Windows: /// File path: assets/images/state/empty_state_new_space_black.svg Ubuntu: /// File path: assets\images\state\empty_state_new_space_black.svg * Tiny refactor Apply @wasabeef's suggestion: used posixStyle for file path. Co-authored-by: Daichi Furiya <[email protected]> Co-authored-by: Daichi Furiya <[email protected]>
1 parent ac8ae40 commit c52e451

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/lib/generators/assets_generator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ class _Statement {
425425
final bool isConstConstructor;
426426
final bool needDartDoc;
427427

428-
String toDartDocString() => '/// File path: $filePath';
428+
String toDartDocString() => '/// File path: ${posixStyle(filePath)}';
429429

430430
String toGetterString() =>
431431
'$type get $name => ${isConstConstructor ? 'const' : ''} $value;';

0 commit comments

Comments
 (0)