Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

OneNote imported notes links can be broken if the href is broken in more than one style #11600

Closed
pedr opened this issue Jan 7, 2025 · 0 comments · Fixed by #11602
Closed
Assignees
Labels
bug It's a bug import Related to importing files such as ENEX, JEX, etc.

Comments

@pedr
Copy link
Collaborator

pedr commented Jan 7, 2025

Found when investigating #11596

Operating system

Linux

Joplin version

3.2.5

Desktop version info

Joplin 3.2.5 (dev, linux)

Client ID: fcd880306d4c4cefbb8901c026072659
Sync Version: 3
Profile Version: 47
Keychain Supported: No

Revision: b7bb982 (fix-onenote-without-title-fallbacking-to-links)

Current behaviour

  1. Create a OneNote notebook
  2. Add a note with a link that includes more than one style
  3. The <a> element for the link will be broken, with the data for href being rendered where the text should be

Expected behaviour

  1. Create a OneNote notebook
  2. Add a note with a link that includes more than one style
  3. The <a> link should be properly formated, with a working link and the correct text inside <a></a>

Logs

Useful information:

Details
OneNoteConverter:  Parts: [
    "Tips from a Pro: Using Trees for Dramatic Landscape Photography",
    ".one#Tips%20from%20a%20Pro%20Using%20Trees%20for%20Dramatic%20Landscape%20Photography&sec
    "风景",
    "\u{fddf}HYPERLINK \"onenote:https://d.docs.live.net/c8d3bbab7f1acf3a/Documents/Photograph
], Indices: [
    83,
    85,
    272,
], Styles: [
    ParagraphStyling {
        charset: Some(
            Ansi,
        ),
        bold: false,
        italic: false,
        underline: false,
        strikethrough: false,
        superscript: false,
        subscript: false,
        font: None,
        font_size: None,
        font_color: None,
        highlight: None,
        next_style: None,
        style_id: None,
        paragraph_alignment: None,
        paragraph_space_before: None,
        paragraph_space_after: None,
        paragraph_line_spacing_exact: None,
        language_code: Some(
            2052,
        ),
        math_formatting: false,
        hyperlink: true,
    },
    ParagraphStyling {
        charset: Some(
            Gb2312,
        ),
        bold: false,
        italic: false,
        underline: false,
        strikethrough: false,
        superscript: false,
        subscript: false,
        font: Some(
            "Microsoft YaHei",
        ),
        font_size: None,
        font_color: None,
        highlight: None,
        next_style: None,
        style_id: None,
        paragraph_alignment: None,
        paragraph_space_before: None,
        paragraph_space_after: None,
        paragraph_line_spacing_exact: None,
        language_code: Some(
            2052,
        ),
        math_formatting: false,
        hyperlink: true,
    },
    ParagraphStyling {
        charset: Some(
            Ansi,
        ),
        bold: false,
        italic: false,
        underline: false,
        strikethrough: false,
        superscript: false,
        subscript: false,
        font: None,
        font_size: None,
        font_color: None,
        highlight: None,
        next_style: None,
        style_id: None,
        paragraph_alignment: None,
        paragraph_space_before: None,
        paragraph_space_after: None,
        paragraph_line_spacing_exact: None,
        language_code: Some(
            2052,
        ),
        math_formatting: false,
        hyperlink: true,
    },
    ParagraphStyling {
        charset: Some(
            Ansi,
        ),
        bold: false,
        italic: false,
        underline: false,
        strikethrough: false,
        superscript: false,
        subscript: false,
        font: None,
        font_size: None,
        font_color: None,
        highlight: None,
        next_style: None,
        style_id: None,
        paragraph_alignment: None,
        paragraph_space_before: None,
        paragraph_space_after: None,
        paragraph_line_spacing_exact: None,
        language_code: Some(
            1033,
        ),
        math_formatting: false,
        hyperlink: true,
    },
]

@pedr pedr added the bug It's a bug label Jan 7, 2025
@pedr pedr self-assigned this Jan 7, 2025
@pedr pedr added the import Related to importing files such as ENEX, JEX, etc. label Jan 7, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug It's a bug import Related to importing files such as ENEX, JEX, etc.
Projects
None yet
1 participant