Submitted by mima in lobby (edited )

So say you want to use this anchor 7 times:

[cyndaquil](https://bulbapedia.bulbagarden.net/wiki/Cyndaquil)

Instead of just copy pasting that whole snippet you can do this:

[cyndaquil]: https://bulbapedia.bulbagarden.net/wiki/Cyndaquil

And then reference it with just [cyndaquil] like so: cyndaquil

Need different text for the anchor? No problem! First put the text you want to appear in square brackets, and then put [cyndaquil] beside it. Example:

[best johto starter][cyndaquil]

Which becomes this: best johto starter

This also works with image embeds! I'd imagine it would be more useful on that front because the links are really long there!

So instead of copying this embed code over and over:

![cyndaquil pinball](/submission_images/d77dd5407070bb17f38d059e0dd0d5b7e75684683a051928bd7e9dfde1dc5166.gif)

Do this:

[cyndaquil gif]: /submission_images/d77dd5407070bb17f38d059e0dd0d5b7e75684683a051928bd7e9dfde1dc5166.gif

And copy to your hearts content:

![cyndaquil gif] = cyndaquil gif

Also works for images as anchors:

[![cyndaquil gif]][cyndaquil] = cyndaquil gif

Hopefully with this technique you can save some characters in your Markdown code! :D

cyndaquil gifcyndaquil gifcyndaquil gifcyndaquil gifcyndaquil gifcyndaquil gifcyndaquil gifcyndaquil gifcyndaquil gif

26

Comments

You must log in or register to comment.

mima OP wrote

Btw I was able to discover this feature because of this StackOverflow thread: https://stackoverflow.com/questions/24580042/github-markdown-are-macros-and-variables-possible

Apparently they're called "reference-style links".

As to why/how I found this, I was searching for a way to center text in Raddle. Unfortunately it's not possible without changing the CSS to allow for it from Markdown, like what u/sudo has done for spoilering text.

9

asterism wrote (edited )

     
                    Typing a bunch of text to see if this is going to work the way I think it will. Not technically centering text just offsetting it from the left hand side. Will probably look like site on mobile but screw mobile users. JK I love you all. Have you ever had an empanada? I haven't, I should try one of tose some time. Bet they are tasty. I want some veggie street tacos. That sounds dope as hell. Blah Blah Blah Blah                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6

mima OP wrote

It looks fine here on mobile actually! Maybe I will look into that Markdown tomorrow lol (I can see it by requesting a JSON version of this comment)

5

asterism wrote (edited )

Oh interesting I wonder if the JSON shows hidden stuff to?

edit: the answer is yes.

5

asterism wrote

 
a whole bunch of text Typing a bunch of text to see if this is going to work the way I think it will. Not technically centering text just offsetting it from the left hand side. Will probably look like site on mobile but screw mobile users. JK I love you all. Have you ever had an empanada? I haven't, I should try one of tose some time. Bet they are tasty. I want some veggie street tacos. That sounds dope as hell. Blah Blah Blah Blah
4

asterism wrote

Here is the how of it. I can explain the why if anyone cares.

This is the second set of text


|   | 
| :---: |
|centered text|

This was the first one

  |   |  
:--- | :---: | ---:
  (the amount of nbsps here control offset from left side ) | centered text |   (the amount of nbsps here control how narrow the column is.)

4

mima OP wrote

Ah, so you used a table... That makes sense.

Unfortunately it doesn't make sense semantically (we're pretty much abusing tables here lol) so RIP screen readers I guess, but I guess there's no other way if we can't do inline CSS in Markdown...

2

asterism wrote (edited )

cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil
7

mima OP wrote

cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil cyndaquil
7

mima OP wrote

Aha! I thought it wasn't working. In mobile it shows up like a blank comment to me, probably due to how small the Cyndaquil got scaled down LMAO

6

ReddRaven wrote

It shows up for me, but only if I rotate my phone to landscape lol

2

moonlune wrote

ur a genius mima one day you'll make raddle Turing complete

6

mima OP wrote

Hah, fools, you have easily fallen for the first step of my master plan. The next time I post a Raddle Markdown Tip^TM you will not know you are actually mining crypto for my bitcoin account! Mwahahahahaha!

3