starman@programming.dev to Lemmy App Development @lemm.ee · edit-21 year agoRegex for lemmy spoilersmessage-squaremessage-square2fedilinkarrow-up110arrow-down11file-text
arrow-up19arrow-down1message-squareRegex for lemmy spoilersstarman@programming.dev to Lemmy App Development @lemm.ee · edit-21 year agomessage-square2fedilinkfile-text
Through trial and errors, I’ve created regex for lemmy spoilers: /:::\sspoiler\s+(?<title>.+)\n(?<body>[\s\S]+?)\n:::/g link to regex101.com with explanation
minus-squarePrefix@lemm.eeMlinkfedilinkarrow-up3·1 year agoNice! Thanks for this! I was taking a peek at how some other apps are handling this (i.e Memmy) and this looks more complete, although TBH I still find regex archaic and a pain to debug 😭
Nice! Thanks for this! I was taking a peek at how some other apps are handling this (i.e Memmy) and this looks more complete, although TBH I still find regex archaic and a pain to debug 😭