Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DText] Implement capitalization handling for all ID links #5694

Open
Undisguised-Art opened this issue Apr 30, 2024 · 0 comments
Open

[DText] Implement capitalization handling for all ID links #5694

Undisguised-Art opened this issue Apr 30, 2024 · 0 comments

Comments

@Undisguised-Art
Copy link
Contributor

Problem Statement

The current DText implementation does not offer users control over capitalization in ID links. This limitation forces users to use workarounds, which is frustration for those who prefer correct capitalization in their content.

Examples of the current behavior

DText Result Expected
Post #1234 post #1234 Post #1234
ArtStation #1234 artstation #1234 ArtStation #1234
bur #1234 BUR# 1234 BUR# 1234

It makes sense that the abbreviation of "bulk update request" is always capitalized, but what about the rest?


Current Workarounds

While it is possible to workaround the issue by using one of the other full-length link formats, this requires additional effort and is not conducive to maintaining style consistency for these links. Additionally, it is worth noting that external ID links are not decorated with external link icon. I am not sure if that is a feature or an oversight, but it does mean the workaround is not capable of providing identical results.

Link Decoration Differences

DText Result
artstation #1234 artstation #1234
"artstation #1234":https://www.artstation.com/artwork/1234 artstation #1234 external link icon

Solution Proposal

Given that ID links are a shorthand format for convenience, I do not think it is necessary to support arbitrary capitalization. Supporting arbitrary capitalization could cause two main issues:

  • It would allow capitalization typos to be inadvertently passed to the output, which is particularly undesirable since backwards compatibility is a goal.
  • It would require users to remember and use correct capitalization style for proper nouns (e.g., Artstation vs. ArtStation), which reduces the overall convenience of using these links.

Instead, I suggest allowing capitalization that matches a few common styles: four options for common nouns and two for proper nouns.

Link Specifier Type Input Capitalization Output Capitalization
Common Nouns Sentence case Sentence case
Capitalize each word Capitalize each word
All uppercase All uppercase
All lowercase All lowercase
Any other case All lowercase
Proper Nouns All uppercase All uppercase
Any other case Correct capitalization for the proper noun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant