jkomoros / card-web

The web app behind thecompendium.cards
Apache License 2.0
46 stars 8 forks source link

Clean up basic markdown on paste #625

Open jkomoros opened 2 years ago

jkomoros commented 2 years ago

A lot of times rough stuff pasted in has markdown. It should be converted to HTML by default

jkomoros commented 2 years ago

Also all caps should be bolded (... except if an acryonym? Maybe have denylist of acrynonyms / all-caps things that shoudln't be bolded)

jkomoros commented 2 years ago

This might be as simple as, when we detect a paste on a content editable item (if it's a field that supports html) then just run it through snarkdown every time.

I THINK that most markdown formatting is extremely rare to happen 'accidentally' so this should be mostly safe

jkomoros commented 2 years ago

Maybe have a keyboard shortcut that can also be run to extract markdown formatting? And run it automatically on paste?

jkomoros commented 1 year ago

And also replace uppercase words with bold. We could process the whole corpus and look for words that at least two characters that are seen as uppercase in at least two cards to know that those should be skipped, e.g. API. (Althoguh I bet there are a lot of working-notes cards that erroneously have AND and OR still capitalized)