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

Desktop: Fixes #11597: OneNote Importer should only use text on fallback title #11598

Merged

Conversation

pedr
Copy link
Collaborator

@pedr pedr commented Jan 7, 2025

Fixes #11597

Summary

OneNote has a similar behaviour to Joplin where when a note doesn't have a title it uses the first paragraph as the fallback title. Differently from Joplin, this doesn't seems to alter the original note, happening only in the user interface, since the title property is empty in these cases.

The logic already implemented gets the first Section outline (equivalent to the first paragraph) and uses it as the title, the missing logic here was to remove the hyperlink part of it when it exists so the title doesn't get too long causing.

Note

This change only modifies the content of the title, it shouldn't affect the content shown in the body

Testing

I added a test notebook with three types of notes without title:

  • one that links Wikipedia,
  • other that links another note via the web view (links to onedrive)
  • and other that links that uses the onenote: protocol

@pedr pedr changed the title Desktop: Resolves #11597: OneNote Importer should only use text on fallback title Desktop: Fixes #11597: OneNote Importer should only use text on fallback title Jan 9, 2025
@laurent22 laurent22 merged commit a81af07 into laurent22:dev Jan 9, 2025
7 checks passed
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.

OneNote importer adding hypertext reference to the title when using a link the fallback for the title
2 participants