Created
October 19, 2012 16:15
-
-
Save jbranchaud/3919120 to your computer and use it in GitHub Desktop.
A quick function to split up/remove the <br /> tags when a WP sourcecode example gets auto-formatted.
This file contains hidden or 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
import os | |
import sys | |
# add the offending text to file1.txt | |
f = open("file1.txt", 'r') | |
content = f.read() | |
contentArray = content.split('<br />') | |
for item in contentArray: | |
print item | |
# then copy/paste the console output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment