Skip to content

Sentence case doesn't work when it begins by non-letter characters #114

Description

@Thomas-D-C

Bug description

Sentence case doesn't work when it begins by non-letter characters (spaces or punctuation).

Steps to reproduce

  1. Type ant select (text between parenthesis).
  2. Convert it to Sentence case. You can't do it, since it's identical.
  3. Select text between parenthesis, inside parenthesis.
  4. Convert it to Sentence case.
  5. You can see that it works.

Actual behavior

(text between parenthesis) makes (text between parenthesis) (Lowercase).

Expected behavior

(text between parenthesis) would make (Text between parenthesis) (Sentence case inside parenthesis).

Reproducibility on test website

System

Browser and version: Firefox 150.0.2
Add-on version: 0.8

Possible solution

I don't remember where to find the API.
But if I'm right: It decomposes (text between parenthesis) in: (, text, , between, , parenthesis, ). Then, the Add-on chooses to apply Capitalize Each Word only to the first item (and Lowercase to the others).

So, words always are 1 item out of 2, never 2 consecutive items.
So, you could apply Capitalize Each Word to the first 2 items, to fix this bug, without taking the risk of capitalizing 2 words.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions