Follow

okay cool i fixed the #!shrug bangtag

it used to just be chunk = '¯\\\_(ツ)\_/¯' but that breaks if you have plaintext or html formatting, i.e. anything but markdown

also i'm not 100% sure how exactly all those backslashes work out to something that's correct, it was complete trial and error

now i have it so that it works no matter what formatting type (or lack thereof) you have, and i actually understand it. plus i get to use a cool ruby feature that i only just learned about

chunk = case status.content_type
when 'text/plain', 'text/html'
'¯\\_(ツ)_/¯'
when 'text/markdown'
'¯\\\\\\_(ツ)_/¯'
end
Sign in to participate in the conversation
glaceon.social

An instance of the Mastodon microblogging social network for Ice type pokemon, fans of Ice type pokemon, and anyone else who's, well, cool. Chat with our community here, or with your friends on any other instance! Our code of conduct page can be found here!