Metadata not shown if last YAML line is a comment

Steps to reproduce

  • Enable Settings → Editor → Show frontmatter.

  • Make a new note and put in some YAML:

    ---
    #searchterm: "#family or #friends"
    searchterm: '"People"'
    # duration (from today) to show birthdays for; ISO-8601 periods ok
    # P1D is different from PT24H in case of DST switching.
    #duration: 2 years
    duration: P2Y
    dateformat: "ddd, D. MMMM"
    # below contains an U+200B zero-width space to circumvent DV interpreting it as an ordered list item
    #dateformat: "D​. MMMM"
    # locale-aware dates
    #dateformat: 'L'
    #dateformat: 'LLLL'
    ---
    
  • Put a header and (optional) some text:

    ### Anstehende Geburtstage
    
  • Enter preview mode. You’ll see a large blank space (where metadata would be shown), maybe sometimes it flickers and can be seen for a fraction of a second:

  • Edit the frontmatter so the last line before the closing --- is non-comment YAML:

    x: y
    ---
    
  • Magically, the metadata will be shown again:

Expected result

Metadata shown even if last line is a YAML comment.

Actual result

See above.

Environment

  • Operating system: Linux Mint 20.1/Cinnamon
  • Obsidian version: 0.12.3, installer 0.12.3

Additional information

I can’t repro this. post a screen recording of this happeing in the help vault.

Darn! Sorry for the hassle, seems I fell into the trap again not to close/reopen Obsidian after updating community plugins.

Couldn’t repro in the help vault either, and after restart now works in my other vault, too.

Made a big note to myself: ALWAYS TEST IN HELP VAULT, TOO!

Thanks for your time nevertheless, much appreciated.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.