Topics with period at end of abbreviations don't keep the period

AI-generated summary

Topic Title Issue: The discussion revolves around a bug where a topic title’s trailing period is removed, as seen in the original topic title downey and the title of the current topic.

The cause of this issue is the title_prettify setting, which includes a regex that removes trailing periods from post titles elberet. riking suggests disabling this setting to resolve the issue, but notes that it will also disable other features.

The debate centers on whether this is a bug or a feature. downey argues that the period is necessary in certain cases, such as abbreviations downey. elberet counters that the removal of trailing periods is a common practice in some locales and styles.

However, downey cites the Chicago Manual of Style, which states that periods should not be removed from abbreviations, even at the end of a title. elberet acknowledges this point, suggesting that it’s a separate bug report.

Finally, codinghorror notes that the solution is to disable the title_prettify setting, which already exists.

Reproduce: Create a topic with a period-laden abbreviation at the end of it, e.g.:

I like Civilized Discourse Construction Kit, Inc.

Expected behavior: The topic title is rendered exactly as the user entered it (see above).

Actual behavior: The period at the end doesn’t persist, e.g.:

I like Civilized Discourse Construction Kit, Inc

This topic was created with a period at the end, too, but you’ll never know. Period.

1 curtida

It’s not a bug, it’s a feature:

1 curtida

Ha ha, nice joke. :wink:

No, really. That piece of regex specifically removes trailing periods from post titles… no joke at all.

If you want to disable this, turn off the title_prettify setting.

Note that this will also turn off other features, such as deduplicating exclamation marks and question marks, downcasing all-uppercase titles, capitalizing the first letter of the title,

The bug is that it’s not an “unnecessary” period or an “extra . at end” as the so-called feature describes. It’s a single, very necessary period.

I’ll turn off the setting, of course, but that doesn’t mean this isn’t a bug.

1 curtida

If it is a bug, it is at least dependent on the locale.

In German, for instance, “the period does not occur after detached (from the remaining text clearly separated) lines” (translated from Duden, Regel 153), and regarding English there’s even a topic at StackExchange about it that indicates that titles generally should not end with a full stop.

2 curtidas

And from the Chicago Manual of Style (a bit more authoritative on grammar than Stack Exchange :smile:) … “[a]n abbreviation that ends with a period must not be left hanging without it”. (Which is actually the issue in the example above.)

Fair point, but that’s a different bug report:

“Text cleaner should not remove periods from abbreviations even at end of title”

Edited title of this post to refer to the original example.

Even the despised mobile OS autocorrect allows users to recover from its “software knows best” suggestions of what’s right. Why doesn’t Discourse?

This feature already exists, just disable topic title prettify.. nothing left to discuss.