146
submitted 2 months ago* (last edited 2 months ago) by WhyEssEff@hexbear.net to c/chapotraphouse@hexbear.net

A complete^[I think? emilie-shrug] guide to Lemmy's supported markdown formatting.


Heading 1 # Heading 1

Heading 2 ## Heading 2

Heading 3 ### Heading 3

Heading 4 #### Heading 4

Heading 5 ##### Heading 5
Heading 6 ###### Heading 6

Bold text using **Bold text** or __Bold text__

Italic text using *Italic text* or _Italic text_

Bold and italic text using ***Bold and italic text***

~~Strikethrough text~~ using ~~Strikethrough text~~^[whoops phoenix-bashful]


This is a blockquote using > This is a blockquote

Nested blockquote using >> Nested blockquote


  • Unordered list item using - Unordered list item
  • Another item using - Another item
  1. Ordered list item using 1. Ordered list item
  2. Another ordered item using 2. Another ordered item

Inline code using `Inline code`

Unspecified code block:

#include <stdio.h>

int main() {
    int x = 10;
    if (x > 5) {
        printf("This is a test!\n");
    }
    return 0;
}

// **Wow! How neat!**

Using ``` \n code \n ```

C code block:

#include <stdio.h>

int main() {
    int x = 10;
    if (x > 5) {
        printf("This is a test!\n");
    }
    return 0;
}

// **Wow! How neat!**

Using ```c \n code \n ```

Same, but designated as markdown code block:

#include <stdio.h>

int main() {
    int x = 10;
    if (x > 5) {
        printf("This is a test!\n");
    }
    return 0;
}

// **Wow! How neat!**

Using ```markdown \n code \n ```


This is a link using [This is a link](https://hexbear.net/c/main)

This is an image: ![](https://hexbear.net/pictrs/image/456a406f-0cbc-4a0b-8062-d89a078ff465.png)

This is an emote: this-is-not-an-emote using ![this-is-not-an-emote](https://hexbear.net/pictrs/image/315ad77c-a156-42c9-aa92-ee4e724e241a.png "emoji this-is-not-an-emote")

Quotations after second part of links/images are alt-text, which appear when moused over and help w/rt screen readers.


Footnote reference[^3][^3]

[^3]: Footnote definition using [^3]: Footnote definition

Inline footnote^[citation needed]^[citations-needed with Adam Johnson and Nima Shirazi]


This is
how to
make tables
| This | is |
|-|---|
| how | to
| make | tables |

~Sub~script using ~Sub~script

^Super^script using ^Super^script


{text|ruby} using {text|ruby}


spoilerThis is hidden content using
spoiler spoiler \nThis is hidden content\n::: :::


Horizontal rule using ---, ***, or ___:


Two spaces and a newline \n
to single-space your text

Otherwise
it looks like:

Otherwise it looks like


If you know anything else that works, let me know and I'll add it. Asked too many times to not try and compile a reference for people, and I sometimes forget myself so it's nice to have the reference. Here are the footnotes, by the way!
hello footnotes! kirby-wave^[hello! koishi-wave]

top 50 comments
sorted by: hot top controversial new old
[-] joaomarrom@hexbear.net 34 points 2 months ago* (last edited 2 months ago)

Libs: "Hexbear is a tankie echo chamber"

the Hexbear echo chamber:

post hog

post hog

post hog

post hog

post hog
post hog
[-] propter_hog@hexbear.net 16 points 2 months ago

post hog

ok

[-] ExotiqueMatter@lemmygrad.ml 4 points 2 months ago

The more hog you post the more communist you are

[-] FunkyStuff@hexbear.net 20 points 2 months ago

There's another one, if you write beanis it gives you a ton of upbears.

[-] PorkrollPosadist@hexbear.net 13 points 2 months ago

It kills me that there's no way to do strikethrough on here

[-] WhyEssEff@hexbear.net 19 points 2 months ago* (last edited 2 months ago)
[-] PorkrollPosadist@hexbear.net 5 points 2 months ago

~~I swear I've tried to do this in the past and it hasn't worked~~

[-] Mindfury@hexbear.net 13 points 2 months ago

i can never make heading work

[-] Mindfury@hexbear.net 9 points 2 months ago

oh holy shit

[-] WaterBowlSlime@lemmygrad.ml 10 points 2 months ago

For tables, you can make things easier for yourself by using only one hyphen in the delimiter. The lines at the start and end of each row are unnecessary too. Like this:

header 1|header 2|header 3
|-|-|-|
info|data|thing
stuff||entry
header 1 header 2 header 3
info data thing
stuff entry

Also, you can leave squares blank.

[-] WhyEssEff@hexbear.net 6 points 2 months ago

altered for clarity 07

[-] WaterBowlSlime@lemmygrad.ml 3 points 2 months ago

Also tables don't render in Jerboa without a blank line above them. That means you can't hide a table within a spoiler, sadly ):

[-] Achyu@lemmy.sdf.org 2 points 2 months ago* (last edited 2 months ago)

Cool. I make tables with the help of markor

Header 1. Header 2 . Header 3
Data1 . Next data2 . Other Data3

Then I select the text and use search & replece to replace the '.' with |.
The end and beginning '|' can be added replacing \n with | \n| with the regular expressions option turned on.
Saves time typing the | character on mobile

I do have to add the |-|-|-| in the 2nd row

[-] buckykat@hexbear.net 9 points 2 months ago

Something I just discovered yesterday is that it's impossible to post selected excerpts from a numbered list, it auto"corrects" the numbers to be sequential.

[-] WhyEssEff@hexbear.net 9 points 2 months ago* (last edited 2 months ago)
  1. this is not the first item on the list

  2. this is the second item as well

  3. or is it?

2. this is not the first item on the list

2. this is the second item as well
3. or is it?
[-] buckykat@hexbear.net 11 points 2 months ago

You don't have to start at one but you can't skip any. These were written as 4, 7, 12:

  1. This is the fourth entry

  2. This is the seventh entry

  3. This is the twelfth entry

[-] propter_hog@hexbear.net 10 points 2 months ago
  1. This is the fourth entry

...

  1. This is the seventh entry

...

  1. This is the twelfth entry

The formatting sucks, but it can be done. You essentially are just breaking it up into three separate lists.

[-] buckykat@hexbear.net 5 points 2 months ago

Yeah the workaround I found yesterday is prepending a bit of text to each entry, but it surprised me that I had to

[-] comrade_pibb@hexbear.net 8 points 2 months ago* (last edited 2 months ago)

6. i think you can escape the period
7. Like this: 7\.

[-] buckykat@hexbear.net 6 points 2 months ago
[-] comrade_pibb@hexbear.net 6 points 2 months ago
[-] Cowbee@hexbear.net 8 points 2 months ago

Awesome post, comrade kris-love

[-] EllenKelly@hexbear.net 7 points 2 months ago

แ••(แ›)แ•—

[-] bdonvr@thelemmy.club 7 points 2 months ago* (last edited 2 months ago)

Do triple nested block quotes work?

I dunno why not try?

Yeah I suppose I could

Seems like they work fine

[-] abc@hexbear.net 6 points 2 months ago

ok now how do i do an in-line spoiler thanks

[-] WhyEssEff@hexbear.net 4 points 2 months ago
[-] abc@hexbear.net 4 points 2 months ago

oooaaaaaaauhhh MARKDOWN SUCKS

[-] GVAGUY3@hexbear.net 6 points 2 months ago* (last edited 2 months ago)
const post = 'post';
switch (post) {
  case 'Hog':
    console.log('Hog posted.');
    break;
  case 'Sicko':
    console.log('yes)
  default:
    console.log(`ppb}.`);
}

Totally didn't do a stack overflow statement because I forgot how to do a switch statement in JS

[-] roux@hexbear.net 5 points 2 months ago

Not that big but something I learned semi-recently since I write my notes in markdown, but when making lists, you can use either the "-" or the "+" symbol.

So this is a list with +

  • Stalin
  • shouldn't
  • have
  • stopped
  • at
  • Berlin

but looks like this:

+ Stalin
+ shouldn't 
+ have
+ stopped
+ at
+ Berlin
[-] glans@hexbear.net 2 points 2 months ago

an * works too:

  • dash
  • asterisk
  • plus
- dash
* asterisk
+ plus
[-] roux@hexbear.net 1 points 2 months ago

TIL but why are your bullets square and mine are circles?

[-] BrezhnevsEyebrows@hexbear.net 5 points 2 months ago

What makes emojis different from images that they will be displayed in line?

[-] WhyEssEff@hexbear.net 6 points 2 months ago* (last edited 2 months ago)

custom parsing rule for alt-text. if the first word is 'emoji' it's rendered as an emoji.


![](https://hexbear.net/pictrs/image/a66b82a6-450d-450a-8116-4989af1de8bf.png "emoji post-maxi")


![](https://hexbear.net/pictrs/image/a66b82a6-450d-450a-8116-4989af1de8bf.png "post-maxi")

[-] PointAndClique@hexbear.net 5 points 2 months ago* (last edited 2 months ago)

hot diggity

[-] riseuppikmin@hexbear.net 5 points 2 months ago

I kind of hate you for making me aware of this because now I have to update the emulation thread

[-] Achyu@lemmy.sdf.org 4 points 2 months ago

Multi-level lists.

Using 4 spaces at the front helps continue the list or make multi-level lists

  1. This post is
    1. sugoi
    2. kakoi
    3. adipoli
  • This post is
    • Cool
      • And
        • Awesome
  1. List item1
    Explanation

    Quotes

    • Or sub content
  2. List item 2
    The same
[-] zkrzsz@hexbear.net 4 points 2 months ago
[-] peeonyou@hexbear.net 3 points 2 months ago

but how did you do the orange text in the nested blockquote?

[-] WaterBowlSlime@lemmygrad.ml 5 points 2 months ago

In programming, keywords are color-coded automatically. So data types, functions, libraries, etc.

You can't choose the color scheme in lemmy, I don't think

[-] PointAndClique@hexbear.net 2 points 2 months ago* (last edited 2 months ago)

Editing iut comment cos I don't actually understand

[-] LisaTrevor@hexbear.net 3 points 2 months ago
[-] Cysioland@lemmygrad.ml 3 points 2 months ago

That's how I've learned that Boost doesn't support many of these

[-] sovietknuckles@hexbear.net 3 points 2 months ago* (last edited 2 months ago)

This is an image: ![](https://hexbear.net/pictrs/image/456a406f-0cbc-4a0b-8062-d89a078ff465.png)

Always include a description of your image between the square brackets so that visually impaired users know what the image is a picture of. Example:

![post maxi tweet](https://hexbear.net/pictrs/image/456a406f-0cbc-4a0b-8062-d89a078ff465.png)post maxi tweet

or

![It's post maxi. If grossing in hhyswixw](https://hexbear.net/pictrs/image/456a406f-0cbc-4a0b-8062-d89a078ff465.png)It's post maxi. If grossing in hhyswixw

or

![https://xcancel.com/cushbomb/status/1713822219074457833](https://hexbear.net/pictrs/image/456a406f-0cbc-4a0b-8062-d89a078ff465.png)https://xcancel.com/cushbomb/status/1713822219074457833

Or if you want, you can include a title for your image, which non-visually-impaired users will see when hovering over the image. Like this:

![It's post maxi. If grossing in hhyswixw](https://hexbear.net/pictrs/image/456a406f-0cbc-4a0b-8062-d89a078ff465.png "It's post maxi. If grossing in hhyswixw")It's post maxi. If grossing in hhyswixw

More detail about the importance of alt text for screen readers


Also, you can host videos with sound on toots.matapacos.dog and embed them on Hexbear (but you should include descriptions of any videos you post for blind users, too).

Example: I posted a video in this toot, and now I can embed it

![We hold these truths to be self-evident. All men and women are created, by the, you know, you know the thing](https://assets.toots.matapacos.dog/media_attachments/files/113/027/984/434/659/548/original/58d6bb11df28b827.mp4)

We hold these truths to be self-evident. All men and women are created, by the, you know, you know the thing

[-] glans@hexbear.net 2 points 2 months ago

omg i have never seen anyone do this video thing and I am not sure I want it to spread so please don't tell anybody again

tho the video you posted was funny hahaha

[-] Bureaucrat@hexbear.net 3 points 1 week ago

Why have I never seen this before?

[-] Bureaucrat@hexbear.net 1 points 1 week ago

Now all Bureaucrat see it stalin-approval

[-] ExotiqueMatter@lemmygrad.ml 2 points 2 months ago

Thanks [^1]

[^1]: Footnotes were confusing me a bit.

[-] asante@hexbear.net 2 points 2 months ago
[-] asante@hexbear.net 1 points 2 months ago

actually nerd two lines should be changed from:

| how | to

to

| how | to |

this post was submitted on 26 Aug 2024
146 points (100.0% liked)

chapotraphouse

13545 readers
812 users here now

Banned? DM Wmill to appeal.

No anti-nautilism posts. See: Eco-fascism Primer

Gossip posts go in c/gossip. Don't post low-hanging fruit here after it gets removed from c/gossip

founded 3 years ago
MODERATORS