Skip to content

Instantly share code, notes, and snippets.

@danieltomasz
Created August 3, 2023 07:38
Show Gist options
  • Save danieltomasz/51810d2888fc0a30c48fd254a6a64ef0 to your computer and use it in GitHub Desktop.
Save danieltomasz/51810d2888fc0a30c48fd254a6a64ef0 to your computer and use it in GitHub Desktop.
Dynamic highlights - date and words
{
"basic-datetime": {
"class": "basic-datetime",
"color": "#00000000",
"regex": true,
"query": "((\\d{4}-\\d{2}-\\d{2})T(\\d{1,2}:\\d{2})( am| pm| AM| PM)?)|((\\d{4}-\\d{2}-\\d{1,2}))|((\\d{1,2}:\\d{2}( am| pm| AM| PM)?))",
"mark": [
"match",
"group"
],
"css": ".basic-datetime {\n background-color: rgba(59, 87, 148, 0.25) !important;\n color: rgb(88, 136, 200) !important;\n font-size: 87.5%;\n font-weight: 400;\n text-transform: uppercase;\n line-height: 1em;\n padding: 2px 4px 2px 4px;\n text-align: center;\n margin: 0px 0px;\n border: 1px solid transparent;\n border-radius: 0.4em;\n transition: 150ms cubic-bezier(0.2, 0, 1, 0.9);\n filter: saturate(1);\n}\n\n.basic-datetime:hover {\n background-color: rgba(59, 87, 148, 0.40) !important;\n color: rgb(94, 142, 210) !important;\n}\n"
},
"Filler-Words": {
"class": "Filler-Words",
"color": "#2D801838",
"regex": true,
"query": "\\b([Aa] bit|[Aa]bsolutely|[Aa]ctually|[Aa]nd all that|[Aa]nd so forth|[Aa]nyway|[Bb]asically|[Cc]ertainly|[Cc]learly|[Cc]ompletely|[Dd]efinitely|[Ee]ffectively|[Ee]ntirely|[Ee]ssentially|[Ee]vidently|[Ee]xtremely|[Ff]airly|[Ff]rankly|[Ff]requently|[Gg]enerally|[Hh]opefully|[Kk]ind of|[Ll]argely|[Ll]iterally|[Mm]ore or less|[Mm]ostly|[Oo]ccasionally|[Oo]ften|[Oo]verall|[Pp]articularly|[Pp]erhaps|[Pp]ossibly|[Pp]ractically|[Pp]recisely|[Pp]resumably|[Pp]retty|[Pp]rimarily|[Pp]robably|[Pp]urely|[Qq]uite|[Rr]arely|[Rr]ather|[Rr]eally|[Rr]elatively|[Ss]eriously|[Ss]ignificantly|[Ss]imply|[Ss]lightly|[Ss]omehow|[Ss]ort of|[Ss]pecifically|[Ss]trongly|[Ss]upposedly|[Ss]urely|[Tt]he fact that|[Tt]otally|[Tt]ruly|[Tt]ypically|[Uu]ltimately|[Uu]sually|[Vv]ery|[Vv]irtually|[Ww]idely)\\b",
"mark": [
"match"
],
"css": ".cm-line .Filler-Words{\n\ttext-decoration: line-through;\n\tbackground: none;\n\tcolor: var(--text-muted);\n}\n\n/* where to disable */\n.HyperMD-quote.cm-line .Filler-Words,\n.pdf-annotations .cm-line .Filler-Words {\n\ttext-decoration: none;\n\tcolor: unset;\n}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment