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

[Bug] Files with a title containing only a date in the "YYYY-MM-DD" format are ignored #33

Closed
1 of 3 tasks
infologie opened this issue Dec 26, 2022 · 5 comments
Closed
1 of 3 tasks
Labels
bug Something isn't working

Comments

@infologie
Copy link
Contributor

Actions leading to the bug

Create a file with a title containing only a date in the "YYYY-MM-DD" format, e.g. title: 2020-06-03.

Bug description

The corresponding record is not included in the cosmoscope.

What version of Cosma are you using?

CLI 2.0-beta-1

What is your operating system?

  • macOS
  • Windows
  • Linux

What version of the operating system are you on?

macOS 12.6.1

Additional information

Reported by @kevinpolisano.

@infologie infologie added the bug Something isn't working label Dec 26, 2022
@Myllaume
Copy link
Member

Myllaume commented Jan 13, 2023

2021-01-01 value is a timestamp, as YAML specification https://yaml.org/type/timestamp.html.
So, Cosma parse a date and not a string. I will catch this exception.

The question is to know if we respect the specification or if we make an exception.

  • '2021-01-01' -> 2021-01-01
  • 2021-01-01 -> Fri Jan 01 2021 01:00:00 GMT+0100 (heure normale d’Europe centrale)

@kevinpolisano
Copy link

kevinpolisano commented Jan 13, 2023

There are many people who have inserted date in the filename and/or title of their notes (in order to sort and easily retrieved them, see for instance the use of this guy). I think personaly that it is not a good (or useful) practise—I prefer to use a 'date' field or the 'id' field containing creation date—but since it is a common one, I think it would be indeed necessary to catch this exception for the 'title' YAML field.

PS: special symbols in title (comma, hyphens, ...) also produce a bug in Cosma.

@Myllaume
Copy link
Member

Myllaume commented Jan 13, 2023

To be sure, the following titles do not cause any problem during my tests:

  • toto - tata
  • '2001-01-01'

Did you encounter a problem ?

@kevinpolisano
Copy link

It is not a bug raising an error, sorry I would like to say that the "link text" not in 'title' field but in the alternative syntax for links—namely [[id|link text]]—is not properly interpreted in Cosma.

Capture d’écran 2023-01-14 à 14 18 02
Capture d’écran 2023-01-14 à 14 19 09

@infologie
Copy link
Contributor Author

infologie commented Jan 27, 2023

@kevinpolisano This is fixed in Cosma CLI v2-beta-2. We'll close this when the GUI v2 is released.

@Myllaume I have also confirmed the other issue, with the alternative syntax. I'm opening a separate issue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants