site banner

Small-Scale Question Sunday for February 2, 2025

Do you have a dumb question that you're kind of embarrassed to ask in the main thread? Is there something you're just not sure about?

This is your opportunity to ask questions. No question too simple or too silly.

Culture war topics are accepted, and proposals for a better intro post are appreciated.

1
Jump in the discussion.

No email address required.

lol

strikethrough_regex = re.compile('''~{1,2}([^~]+)~{1,2}''', flags=re.A)

Used here

# turn ~something~ or ~~something~~  into <del>something</del>
sanitized = strikethrough_regex.sub(r'<del>\1</del>', sanitized)

Anyway maybe like ~this~?

Which looks like &amp;#126;this&amp;#126;

In unrelated news I'm not sure how much I trust the variable named sanitized to contain what it says on the tin.