Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Handle carriage return on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mannprerak2 committed Jun 18, 2023
1 parent 82bb1eb commit cdf956e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tool/generate_json_schema.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ import 'package:ffigen/src/strings.dart' as strings;

void main() async {
final actualJsonSchema =
JsonEncoder.withIndent(strings.ffigenJsonSchemaIndent).convert(
Config.getsRootSchema().generateJsonSchema(strings.ffigenJsonSchemaId),
);
JsonEncoder.withIndent(strings.ffigenJsonSchemaIndent)
.convert(
Config.getsRootSchema()
.generateJsonSchema(strings.ffigenJsonSchemaId),
)
.replaceAll("\r\n", "\n");

final file = File(strings.ffigenJsonSchemaFileName);
if (!await file.exists()) {
Expand Down

0 comments on commit cdf956e

Please sign in to comment.