Skip to content

text::analyze does not report a trailing mandatory break #103

@dhardy

Description

@dhardy

If the input text to text::analyze terminates with 0xa (line_break=LF), this mandatory break is not reported.

This is unimportant where whitespace may be trimmed, but an issue where with text editors where a trailing new-line must have a position.

Suggested fix: add fn is_mandatory_break to LineBreak and document that users of analyze should check this for the last char. (I'm not 100% sure this works with multi-byte breaks line \r\n, but I think here \r would not be reported so it would be fine.)

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