Comment 1 for bug 1579083

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

I think the way to fix this is something like:

sentence_ending_punctuation = ['.', '!', '?', '…']

When someone types two spaces in a row {
    if (auto punctuation is turned on) {
        last_letter_position = the position of the last character in Unicode’s “Letter” category
        trailing_punctuation = the string between the last_letter_position and the first space
        if trailing_punctuation contains none of the characters from sentence_ending_punctuation {
            replace the last space with a period
        }
    }
}