This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== Epic Snow Leopard Upgrayyyyd Guide === | |
Son, you’re now living in the land of 64-bit systems. | |
That means that some of your 32-bit shit is now broken. | |
Not all is lost. | |
== Fixing MySQL weirdness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub Flavored Markdown Layer | |
def fix_markdown_quirks(text) | |
# prevent foo_bar_baz from ending up with an italic word in the middle | |
text.gsub!(/(\w+_\w+_\w[\w_]*)/) do |x| | |
x.gsub('_', '\_') if x.split('').sort.to_s[0..1] == '__' | |
end | |
# in very clear cases, let newlines become <br /> tags | |
text.gsub!(/(\A|\n\n)(^\w[^\n]*\n)(^\w[^\n]*\n)+/m) do |x| | |
x.gsub(/^(.+)\n/, "\\1 \n") |
NewerOlder