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

Capitalize only first word of sentence in selected text capitalize word after single quote (apostrophe) #33

Open
icytree opened this issue Oct 14, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@icytree
Copy link

icytree commented Oct 14, 2022

Note: Everything works as expected only if the text after the single quote is a single "s".
Issue: In other language like french, apostrophe are used in many other cases.
Example :
voici la ligne représentant l'exemple du problème. would be modified to Voici la ligne représentant l'Exemple du problème.

Benature added a commit that referenced this issue Oct 21, 2022
@Benature
Copy link
Owner

To avoid this problem, for now, ' is disabled to be the signal of the beginning of a new sentence.

@icytree
Copy link
Author

icytree commented Oct 22, 2022

Great it works well ! Thank you

@Benature
Copy link
Owner

Benature commented Nov 5, 2022

It is a temporal workaround, as ' may also contain a sentence (#14). It would be appreciated if you could provide a list that should not be capitalized in French so that I can make a strict rule.

@Benature Benature reopened this Nov 5, 2022
@Benature Benature added the enhancement New feature or request label Nov 5, 2022
@icytree
Copy link
Author

icytree commented Nov 23, 2022

Sorry for the delay, this websites does explains it fairly well in english. In term of pattern, I think it is fair to say that the apostrophe (used through single quotes in Obsidian) is always preceded by 1 to 2 letters (ex. d', qu', ...) and immediately followed by minimally one letter or more forming a word (ex. qu'à, l'exemple...). So I guess this could be matched using regex and look around ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants