WordPress sourcecode shortcode

I just found out about WordPress’s sourcecode shortcode.  It can make some XML I’m posting go from looking like this:

<profiles>
<profile>
<id>local-paths</id>
<properties>
<jbossPath>D:\path\to\JBoss-install-dir</jbossPath>
<jbossConfigPath>D:\path\to\JBoss-install-dir\server\default</jbossConfigPath>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>local-paths</activeProfile>
</activeProfiles>

Or this:

<profiles>
<profile>
<id>local-paths</id>
<properties>
<jbossPath>D:\path\to\JBoss-install-dir</jbossPath>
<jbossConfigPath>D:\path\to\JBoss-install-dir\server\default</jbossConfigPath>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>local-paths</activeProfile>
</activeProfiles>

To this:

<profiles>
<profile>
            <id>local-paths</id>
<properties>
                <jbossPath>D:\path\to\JBoss-install-dir</jbossPath>
                <jbossConfigPath>D:\path\to\JBoss-install-dir\server\default</jbossConfigPath>
            </properties>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>local-paths</activeProfile>
    </activeProfiles>

wow!  (the <properties> element is a little off, but it’s still a lowercase wow :)

There are also other WordPress shortcodes, but I think this is the one I will find most useful, except perhaps the gallery one.

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s