Single bracket [ ] use

I’m feeling like an idiot (but I know I’m not :smiling_face_with_tear: ) for asking something that seems so basic to me, but I haven’t found the answer anywhere.

Does a word inside a single bracket [ ] have any use?

I know I can link like this: [go to google](www.google.com)

But just this formatting: The study of [Science] is essential... does it do anything other than highlighting the word Science?

1 Like

I think it’s just the way the Obsidian markdown parser works. You might type a ( after the ] to make a markdown link, so it’s ready for ya! :saluting_face:

Screenshot 2023-04-18 132752

Some people don’t like that the color changes, and you can change it with a CSS snippet if it bothers you. I usually use single brackets for options to decide on later, so being different from the main text is good for me.

My work experience [was/turned out to be/ended up being] helping to pack for the mid-winter airdrop to Antarctica.

2 Likes

Single square brackets are used for editorial comments and I use them myself. I have gotten into the habit of escaping them by forward slashes, like so: \[some comment\]. (The reader won’t see the slashes and neither do you, unless you are editing the line in Obsidian.)

2 Likes

Sorry, I understood the use of the bars to hide the color, but the usefulness was not clear to me: what is the editorial use?

Everyone will probably use them differently depending on the note and what it needs (see my choices example above), but this is the idea:

  • She continued, “It [the photograph] was clearly taken at dawn.”
  • “The two presidents [U.S. and French] will meet before the conference in Geneva.”
  • Dash explains, “We use the German concept of Bildung [self-cultivation] to help students grow as people rather than turn into career-oriented money-making machines.”
1 Like

If I’m taking notes on something, I often enclose my own thoughts or reflections or commentary in brackets to keep them distinct from the actual flow of whatever I’m taking notes on (a meeting, a presentation, a book, etc.). That way it’s course to me later what came from another source vs my own original thoughts. I definitely take advantage of the different coloring to help me spot and review them more easily later.

1 Like

It’s a quirk of Obsidian’s Markdown highlighting — it’s overzealous about potential reference-style links (and/or it’s implementing ConmonMark’s “bare links”).

Anyway, if you look at it in Reading View you’ll see that it has no effect in the full rendering.

Here’s the snippet I use to fix it:

/* 
Obsidian highlights text in single brackets because it might be a Commonmark link, which annoyingly affects bracketed text in quotes, etc. This snippets stops that (but still leaves proper links highlighted).

Courtesy of trainbuffer #8798. https://discord.com/channels/686053708261228577/694233507500916796/1040011911229612135
*/

.cm-s-obsidian .cm-link.cm-hmd-barelink {
    color: var(--text-normal);
    }
6 Likes

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