starman@programming.dev to Lemmy App Development @lemm.ee · edit-21 year agoRegex for lemmy spoilersmessage-squaremessage-square1fedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1message-squareRegex for lemmy spoilersstarman@programming.dev to Lemmy App Development @lemm.ee · edit-21 year agomessage-square1fedilinkfile-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-up1·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 😭