11
submitted 1 year ago* (last edited 1 year ago) by ljdawson@lemmy.world to c/syncforlemmy@lemmy.world

I'm updating the markdown parser and want to be sure I'm handling all new types of links e.g. links to communities or users.

If you can please comment any examples I'll add support.

Cheers, Lj!

edit: testing a link

edit 2: https://lemmy.world/post/1986302

edit 3: https://feddit.uk/post/699250

edit 4: https://lemmy.ml/post/2335045

edit 5: https://lemmy.world/comment/1706265

edit 6: https://lemmy.ml/comment/1651859

edit 7: https://lemmy.ml/c/asklemmy

edit 8: https://kerala.party/c/asklemmy@lemmy.ml

edit 9: https://lemmy.ml/u/ljdawson

edit 8: https://kerala.party/u/ljdawson@lemmy.world

edit 9: https://latte.isnot.coffee/post/6799

edit 10: !android@lemmy.world

edit: 11: @ljdawson@lemmy.ml

top 50 comments
sorted by: hot top controversial new old
[-] ljdawson@lemmy.ml 4 points 1 year ago
[-] ljdawson@lemmy.world 2 points 1 year ago
[-] sabreW4K3@lemmy.tf 2 points 1 year ago* (last edited 1 year ago)

Relying with markdown to ~~stay~~ on

#topic

[-] ljdawson@lemmy.world 2 points 1 year ago
[-] Xylight@lemmy.xylight.dev 2 points 1 year ago

AAAA!!! 😱😱😱😨😨😨😨

[-] phuntis@sopuli.xyz 2 points 1 year ago
[-] A10@kerala.party 3 points 1 year ago
[-] shadearg@lemmy.world 1 points 1 year ago

/c/asklemmy@lemmy.ml

[-] thurstylark@lemm.ee 3 points 1 year ago

Shrug emote in backticks: ¯\_(ツ)_/¯

Shrug emote unescaped: ¯_(ツ)_/¯

Shrug emote properly escaped: ¯\_(ツ)_/¯

load more comments (1 replies)
[-] Zeus@lemm.ee 2 points 1 year ago* (last edited 1 year ago)

lemmy also (unofficially) supports footnotes.[^1] you may want to view this in a browser^[as it currently doesn't render in any mobile clients]^[also note the differing positions of the caret]

additionally, with no markdown linking at all, the web interface^[and i believe most apps] automatically turns [!community@instance.tld](/c/community@instance.tld) into a link: !community@instance.tld

[^1]: with two different syntaxes

load more comments (1 replies)
[-] ljdawson@lemmy.world 2 points 1 year ago
[-] ljdawson@lemmy.world 2 points 1 year ago

Commenting to save

[-] VonReposti@feddit.dk 1 points 1 year ago* (last edited 1 year ago)

code by using ` (this is escaped)

Example link

Bold

Italic

Quote

  • List item 1
  • List item 2

Heading 1

Heading 2

Heading 3

Heading 4

~~Strikethrough~~

[-] starscar12@lemm.ee 1 points 1 year ago

Lemmy spoilers have different syntax compared to reddit:

This is a spoiler hiding some text
We're no strangers to love
You know the rules and so do I (do I)
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you


[-] omey@lemmy.world 2 points 1 year ago

For some reason, spoiler tags don't work on my end. I use Connect.

[-] maltasoron@sopuli.xyz 1 points 1 year ago
[-] Mr_Blott@lemmy.world 1 points 1 year ago
[-] burgersc12@sh.itjust.works 2 points 1 year ago

Very few clients support the custom ones, e.g.

^sup^

~sub~

ThisOne

[-] portside@monyet.cc 3 points 1 year ago

None of these work in liftoff

[-] can@sh.itjust.works 1 points 1 year ago
[-] NicoCharrua@lemmy.ca 1 points 1 year ago

Works on Jerboa too

[-] Xylight@lemmy.xylight.dev 1 points 1 year ago

Communities:

Users:

  • @user@example.com
  • /u/user
load more comments (1 replies)
[-] lulguy@lemmy.world 1 points 1 year ago

text [^footnote] embedded.

[^footnote]: footnote text with [^another] embedded footnote with continuation

[^another]: footnote text with continuation

Random more comment after the footnotes

[-] ljdawson@lemmy.world 1 points 1 year ago
[-] Nugget@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

Italic Italic

Bold Bold

Deferred Link

Image

  • List1
  • List1
  • List1
  • List2
  • List2
  • List2
  1. One
  2. Two
  3. Three
  1. One
  2. Two
  3. Three

Horizontal Rule


hello world

Horizontal Rule


hello world

Inline code with backticks

# code block
print '3 backticks or'
print 'indent 4 spaces'
# code block
print '3 backticks or'
print 'indent 4 spaces'

secretshi

Some ~subscript~ text

Some ^superscript^ text

[-] OvermindDL1@programming.dev 1 points 1 year ago

Testing some code syntax highlighting (may or may not work depending on UI being used):

fn blah(a: u32) -> Result {
  Ok(a*2)
}
function blah(a) {
  return a*2;
}

Nested (more backticks on our fence nest lesser backticks inside):

```
Example nested
```
[-] med@sh.itjust.works 1 points 1 year ago* (last edited 1 year ago)

Nor in liftoff 10.9 on iOS

[-] eco_game@discuss.tchncs.de 1 points 1 year ago

subscript and superscript don't work for me on Jerboa

[-] maltasoron@sopuli.xyz 1 points 1 year ago

Same on Thunder. Also, the spoiler isn't hidden.

[-] chemsed@lemmy.ca 1 points 1 year ago* (last edited 1 year ago)

I'm on the beta version and here are the issues that I notice. The first horizontal line make the text bold instead of making a line. I think that you cannot "close" a subscript or a superscript. I find the copy block button a bit too large. I think that you used the wrong spoiler tag.

Here below my test on the beta version:

!This is a spoil!<

E~x~ = x^2

Any way, I give my energy to the sync developer and testers ༼ つ ◕_◕ ༽つ

I am not yet subscribed in the Canada community in lemmy.ca, but I should ~~not~~.

You miss 100% of the shots that you don't take

Edit: The Canada@lemmy.ca link don't work. What is the proper way to link to a community in lemmy?

[-] phuntis@sopuli.xyz 1 points 1 year ago

@ljdawson test

[-] phuntis@sopuli.xyz 1 points 1 year ago

@ljdawson@lemmy.world test

[-] sabreW4K3@lemmy.tf 1 points 1 year ago

where did you post that from? It didn't parse. @ljdawson@lemmy.world

[-] ljdawson@lemmy.world 3 points 1 year ago
[-] sabreW4K3@lemmy.tf 2 points 1 year ago

It parses in app but not on the website for some reason

[-] DerpyPlayz18@lemm.ee 1 points 1 year ago* (last edited 1 year ago)

![image alt text](image link)

Example:

A very calming and nostalgic image representing some hills

[-] A10@kerala.party 1 points 1 year ago
[-] anonymoose@lemmy.ca 1 points 1 year ago

Wow, this rendered as a gif on my client (Connect). Did you just write it as an emoji?

That makes me realize that a "view raw" or "view code" button would be awesome.

[-] burgersc12@sh.itjust.works 1 points 1 year ago* (last edited 1 year ago)

You can Copy Text and get the raw markdown version on Connect

[-] anonymoose@lemmy.ca 1 points 1 year ago

Yeah, I knew about that, but I didn't know custom emojis were global. Cool feature!

[-] A10@kerala.party 1 points 1 year ago

I type : and then the custom emoji name, Lemmy Website Auto completes the markdown for it.

[-] anonymoose@lemmy.ca 1 points 1 year ago
load more comments
view more: next ›
this post was submitted on 22 Jul 2023
11 points (92.3% liked)

Sync for Lemmy

15192 readers
3 users here now

👀


Welcome to Sync for Lemmy!

Download Sync for Lemmy


Welcome to the official Sync for Lemmy community.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Community Rules


1- No advertising or spam.

All types of advertising and spam are restricted in this community.



Community Credits

Artwork and community banner by: @MargotRobbie@lemmy.world


founded 2 years ago
MODERATORS