Features

Hide Brackets

5y agoCompleted

I like that I can quickly create a reference to another page in my notes using double brackets. But, once I create the reference and move on to another line, the brackets should disappear, just like any other Markdown syntax (i.e., **, -, etc.). Why are the double brackets treated differently? They probably shouldn't be.

and 16 others

11 comments

  1. Like this? Test running it, releasing as beta soon.

    • img/q4bvzulyct787s3a8ab0ch6b
  2. Chris3y ago

    If someone figured out what needs to be added or changed to the theme json-file in order to hide the brackets, it would be great if you could share it here.

    1. Chris3y ago

      Looks like pasting these two snippets into your theme does the trick:

      "NoteLinks-left-brackets": {

      "regex": "(?:^|\\h)(\\[\\[)(.*?)(\\]\\])",

      "matchPosition": 1,

      "color": " #C5487A",

      "isMarkdownCharacter": true,

      "isHiddenWithoutCursor": true,

      "isRevealOnCursorRange": true

      },

      "NoteLinks-right-brackets": {

      "regex": "(?:^|\\h)(\\[\\[)(.*?)(\\]\\])",

      "matchPosition": 3,

      "color": " #C5487A",

      "isMarkdownCharacter": true,

      "isHiddenWithoutCursor": true,

      "isRevealOnCursorRange": true

      },

      (Found this at https://github.com/jgclark/NP-themes)

      (Sorry about the bad formatting. Canny inserts those empty lines even when I remove them. You'll have to remove them manually to use the snippet

  3. Tony3y ago

    Agree, it's unnecessary visual noise. It should at least be an option of a theme

  4. By the way, the new theme "Toothbleach Condensed" does hide them

    • img/z1ckxxvy9j0gpm9a89gd10o6
    1. Tony3y ago

      Eduard Metzger: This doesn't appear to be the case

    2. Rebecca C3y ago

      Eduard Metzger: No it doesn't hide them for me. I've voted for this request as I find the square brackets makes the page look really messy. I'd love a more minimalistic look!

    3. Rebecca C: Yes, not anymore. But you can get the themes that did hide them still here: https://github.com/jgclark/NP-themes

  5. Personally agree with you Clint Laskowski. I don't want to see the brackets. Have asked the Themes channel for help. https://discord.com/channels/763107030223290449/810232612139…

  6. Amy5y ago

    I like the brackets that stay to emphasise the link is for another note.

  7. This is a very common visual appearance know has wiki links, found in every note tool such as Obsidian, Roan, etc