Skip to content

Documentation parse fail #28

@LaurentiuSimionescu

Description

@LaurentiuSimionescu

Describe the bug
If there is more the one line documentation line for fields then parsing fails.

/// Title description
final String title;

The above will pass.

  /// Title description
  /// Second line of description
  final String title;

The above will not pass.

To Reproduce
Steps to reproduce the behavior:

/// ```dart
/// final description = Description('Text');
/// ```
@docWidget
class Description extends StatelessWidget {
  Description(this.title);

  /// Title description
  /// Second line of description
  final String title;

  @override
  Widget build(BuildContext context) => const Text('Test');
}

Expected behavior
Documentation should be parsed for the field title.

Additional context
Error that is returned:

`  Could not format because the source could not be parsed:
  
  line 5, column 31 of .: Unterminated string literal.
    ╷
  5 │ description: 'Title description
    │                               ^
    ╵
  line 6, column 33 of .: Unterminated string literal.
    ╷
  6 │  Second line of description',),];
    │                                 ^
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions