Closed danielmahon closed 4 years ago
Also change
const possibleNameLines = pubspec.getText().split('\n').filter((line) => line.match(/^\s*name:/));
to
const possibleNameLines = pubspec.getText().split('\n').filter((line) => line.match(/^name:/));
Looks like it is matching
name:
with any spaces in front of it, which matches nested "name" keys. I believe the fluttername:
key you care about has to be in the top level of the YAML tree so you should be able to remove the preceding space matching. Space counts in YAML so any preceding spaces to the rootname
would be incorrect. Am I missing another issue?Will break with pubspec.yaml like:
https://github.com/luanpotter/vscode-dart-import/blob/7d9c85372868a8110b0259c783fe1342f47c1d18/src/extension.ts#L38
should change to:
Thanks for this library!