Drasil icon indicating copy to clipboard operation
Drasil copied to clipboard

Create a criterion for 'valid' proper nouns

Open balacij opened this issue 1 year ago • 3 comments

I think pn should give a hard error if the "proper noun" being given has some forbidden characters in it.

Originally posted by @JacquesCarette in https://github.com/JacquesCarette/Drasil/issues/3565#issuecomment-1651804982

In the context of the linked issue, spaces were a problem in the name of a proper noun during our generation, and @JacquesCarette noted that we aren't actually validating that provided proper nouns are 'valid'. We should create a criteria for what proper nouns are. For example, we should probably ban the 'synthetic' characters, such as \r, \t, \n, \0, etc.

[Note: spaces are allowed in proper nouns, this issue was only recognized in the context of some printer having an issue with spaces in proper nouns]

balacij avatar Sep 17 '23 00:09 balacij

Also worth noting that the original issue was with underscores - should they be consider "invalid" characters?

samm82 avatar Sep 20 '23 16:09 samm82

I feel like underscores are okay in proper nouns. The name of the software might have underscores, and that would be a proper noun. I feel like underscores go in the category of special characters, as discussed by @balacij in #3669.

smiths avatar Sep 20 '23 19:09 smiths

there are many ways to name Conventions,

usually, we use one of them

  • Camel Case (firstName),
  • Snake Case (first_name),
  • Kebab case (first-name),
  • Pascal Case (FirstName)

As far as I know, in web development, I use lower cases for nouns, which is recommended by Meta.

cd155 avatar Sep 25 '23 17:09 cd155