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

Add date autosuggest to readme; Add en-gb support #32

Merged
merged 7 commits into from
Apr 30, 2021

Conversation

liamcain
Copy link
Collaborator

@liamcain liamcain commented Apr 30, 2021

solves #18
solves #30

  • README changes
  • Chrono now looks at the moment.js locale to determine what it should use (only en-us and en-gb supported currently)
  • Minor improvements to date autosuggest
    • Added new setting autosuggestLinkToggle instead of relying on the value of modalLinkToggle. This seemed more intuitive to me, but let me know what you think @argenos
    • Only register a CodeMirror event if the autosuggest is enabled
    • properly unregister event when the plugin is disabled/unloaded
    • Fix regex for X days ago so it shows up in the autosuggest again
  • I added eslint to catch all the Typescript warnings. For a smaller diff, don't look at the last commit.

This was linked to issues Apr 30, 2021
Copy link
Owner

@argenos argenos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I only added two comments with minor suggestions.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved

let date = this.parseDate(selectedText);
onTrigger(mode: string): void {
const activeView = this.app.workspace.getActiveViewOfType(MarkdownView);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could have sworn I had fixed this already! Thanks ❤️

liamcain and others added 2 commits April 30, 2021 09:01
Co-authored-by: Argentina Ortega Sáinz <[email protected]>
Co-authored-by: Argentina Ortega Sáinz <[email protected]>
@liamcain
Copy link
Collaborator Author

Updated. Any opinion on this comment?

Added new setting autosuggestLinkToggle instead of relying on the value of modalLinkToggle. This seemed more intuitive to me, but let me know what you think @argenos

(Previously the behavior was to keep autosuggest in sync with the datepicker settings.)

@argenos
Copy link
Owner

argenos commented Apr 30, 2021

I agree! I think it makes sense to separate these two contexts. Ready to merge?

@liamcain
Copy link
Collaborator Author

Yep, feel free to merge!

@argenos argenos merged commit abb3144 into argenos:master Apr 30, 2021
@liamcain liamcain deleted the chore/update-readme branch April 30, 2021 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add space after inserting time Support parsing DD/MM
2 participants