Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra newline at the end #6

Closed
alexeyinkin opened this issue Jan 25, 2023 · 0 comments
Closed

Remove extra newline at the end #6

alexeyinkin opened this issue Jan 25, 2023 · 0 comments

Comments

@alexeyinkin
Copy link

This code

import 'package:yaml_writer/yaml_writer.dart';

void main() {
  const input = [{'a': {'b': 1}}];
  final writer = YAMLWriter();
  print(writer.write(input).replaceAll('\n', '_'));
}

produces:

- _  a: _    b: 1__

Note the double newline at the end while a single newline was expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant