Hi Redcocker,
I'm not sure it the problem started with v1.7 or not -- but I'm trying to publish this awk code using it and it's ending up adding extra/duplicate characters/words... If I disable the plugin... then the code inside pre works...
The starange thing is... it adds those duplicate characters inside the editor also if I save draft while the plugin is active. A second save draft removes all text from the post.
Following is an example awk code:
awk '{gsub(/ +/,"\t"); print $0}' <file_name>
on preview it becomes:
awk '{gsub(/ +/,"\t"); print awk \'{gsub(/ +/,\"\t\"); print awk '{gsub(/ +/,"\t"); print awk '{gsub(/ +/,"\t"); print $0}' <file_name>}' <file_name>}\' <file_name>}' <file_name> on the front end.
and if I safe draft, the above comes into the editor also, automatically.
It works fine, if I don't put them inside <pre brush...> tags, or works fine inside pre if I disable the plugin.
Tested on a new wordpress install, with no plugins also, and same result. Following is some more awk code inside a bash script you can try out.
#! /bin/sh
#User defined functions example
awk '
{nodecount()} # Execute the user-defined nodecount() for each row to update the node count
$0~/<clusternode /,/<\/clusternode>/{ print } # Print the rows between "<clusternode " and "</clusternode>"
function nodecount() #Function definition for nodecount
{if($0~/clusternode name/){count+=1}
}
END{print "Node Count="count}' $1 #Print the count value in the END pattern which is executed once
sh test.sh cluster.conf
<clusternode name="node-01.example.com" nodeid="1">
<fence>
</fence>
</clusternode>
<clusternode name="node-02.example.com" nodeid="2">
<fence>
</fence>
</clusternode>
<clusternode name="node-03.example.com" nodeid="3">
<fence>
</fence>
</clusternode>
Node Count=3
Note, this is from a published article on a magazine, and I needed to publish that on the magazine's website.