I raised a question here about capitalizing the first letter after a period (".") in Latex. It worked.
Now, I am adapting it to apply this function to markdown files and also want it to capitalize the first letter after “?” and “!”. I made changes in the following:
- from
{ "key": "selector", "operator": "equal", "operand": "text.tex.latex" }
to{ "key": "selector", "operator": "equal", "operand": "text.html.markdown" }
, and - from
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(?:^|\\.)\\s+$" }
to{ "key": "preceding_text", "operator": "regex_contains", "operand": "(?:^|\\.|\\?|\\!)\\s+$" }
It works and capitalize the first letter right after “.”, “?”, and “!”. However, it did not capitalize the first letter in the new line, probably because the “?:^” does not match new line in markdown files, I guess. I would appreciate it if someone can fix it. Thanks.