Skip to content

Seems to be reading a code comment as a focus string #96

Closed
@cabljac

Description

@cabljac

I have some mdx:

ButtonBar(children: [
  TextButton(
    onPressed: () =>
      // Navigator.pop(context) would work here, too
      context.goNamed('family', params: {'fid': widget.family.id}),
    child: const Text('Cancel'),
  ),
  ElevatedButton(
    onPressed: () {
      if (_formKey.currentState!.validate()) {
        final person = Person(
          id: 'p${widget.family.people.length + 1}',
          name: _nameController.text,
          age: int.parse(_ageController.text),
        );
        widget.family.people.add(person);
        context.goNamed('person', params: {
          'fid': widget.family.id,
          'pid': person.id,
        });
      }
    },
    child: const Text('Create'),
  ),
]),

codehike seems to be reading line 4 as a focus string when it isn't. I'm getting:

Error: Invalid number "pop(context" in focus string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions