Huddled Masses
You can do more than breathe for free...
Browse: Home / Test Post. Please look away ;-)

Test Post. Please look away ;-)

By Joel 'Jaykul' Bennett on 25-Jul-2006

This post is just a test post, with some code, some Textile torture, and some embedded images so I can test some things. Please feel free to ignore it completely, unless you just want to see how well my blog handles torture.

Here’s some HTML code:


<p>The extra tools &amp; stuff needed to build xnu for Intel have been posted at <a href="http://www.macosforge.org/files/kernel-tools-8J2135.root.tar.gz">/files/kernel-tools-8J2135.root.tar.gz</a>.  These include relpath and seg_hack and will install in /usr/local/bin/.  The <a href="http://kernel.macosforge.org/intel-build-instructions.html">build instructions</a> have also been updated.  Enjoy!
</p>
&lt;div style="color:red;"&gt;This is red text when rendered&lt;/div&gt;
<p>But &lt;span style="color:blue;"&gt;this is blue text when rendered&lt;/span&gt;, not red.</p>
 

And here’s a little PHP code:

  1.  
  2. <?php
  3. /*
  4. Plugin Name: GeshiWrapper
  5. Version: 1.0
  6. Plugin URI: http://www.huddledmasses.org/category/development/wordpress/textile/
  7. Description: Code highlighting using <a href="http://qbnz.com/highlighter/index.php">GeSHI</a> which works with TextileWrapper
  8. Author: Joel Bennett
  9. Author URI: http://www.huddledmasses.org
  10. */
  11.    
  12. require_once( "geshi.php" );
  13.    
  14. function GeshiWrapperPreTextile($text) {
  15.     global $geshiCodes, $geshiUniqueId;
  16.     $geshiUniqueId = uniqid('');
  17.    
  18.     preg_match_all("#<code (?:(?:(?:lang|language)=[\'\"](?P<lang>[a-zA-Z0-9_-]+)[\'\"])|(?:(?:start|line|startline)=[\'\"](?P<line>[0-9]+)[\'\"])|(?:\W+))?[^>]*>(?P<code>.*?)<\/code>#s", $text, $geshiCodes, PREG_SET_ORDER );
  19.     $i = 0;
  20.     foreach ($geshiCodes as $code) {
  21.         $text = str_replace($code[0], $geshiUniqueId.$i++, $text);
  22.     }
  23.     return $text;
  24. }
  25. ?>
  26.  

And there is some non-highlighted code. In-line: print( "this is not highlighted" );, and the first part of the Hammurabbi Code in block form:

1. If any one ensnare another, putting a ban upon him, but he can not prove it, then he that ensnared him shall be put to death. 2. If any one bring an accusation against a man, and the accused go to the river and leap into the river, if he sink in the river his accuser shall take possession of his house. But if the river prove that the accused is not guilty, and he escape unhurt, then he who had brought the accusation shall be put to death, while he who leaped into the river shall take possession of the house that had belonged to his accuser.

That’s really a bit silly.

But hey, the whole point here is to just see what works and what doesn’t. Here’s more sample Textile:

This is a green title

This is a less important title

This is some red text. Yeah. Just because I can. Actually, you probably don’t care, but it’s cool that I can highlight text using colors or styles.

This is a block quote. It’s in english. It’s more boring than Dean’s.

We should really have a list or two:

  1. This one is colored blue
  2. Two
  1. Three

We can have multi-level lists:

  1. but unlike markdown
    1. we can’t
    2. have long paragraphs
    1. in our lists
    2. Or can we?
    3. This might look like one. But it probably isn’t, really. What on earth do I mean by that? Well, basically, you can embed HTML code, so as long as you don’t mind doing that, you can put your own paragraph breaks in wherever you like.

      Of course, it looks a lot better if you put them in logical places, and it really screws things up if you forget to close them.

    4. The problem is, you end up putting HTML in, which is ugly.
  1. But have you ever really done that?

We can have mixed lists:

  • Point one
  • Point two
    1. Step 1
    2. Step 2
    1. Step 3
    2. Point three
      • Sub point 1
  • Sub point 2

On the topic of inserting plain html, how about we insert an old-fashioned hypertext link? Thankfully, Textile’s clever enough not to muck about with the quote marks in the tags!

This is a link with a title!

this is a header
this is a row
this is another row

A stolen image:

optional alt text

With a link back, so it’s ok ;-) (ooh, look, [announce] [new] my smilies work) [groupwoot] [music] . That’s so fun :D [irule] ... [rolleyes] [yawn] someday I’m going to package all of those up into a plugin for distribution [sorry] .

Some more text of dubious character. Here is a noisome string of CAPITAL letters. Here is something we want to emphasize.
That was a linebreak. And something to indicate strength. Of course I could still use my own HTML tags if I felt like it.

Coding

This is some code, "isn't it". Check out those quote marks! Now for some preformatted text:


	$text = str_replace("<p>%::%</p>","",$text);
	$text = str_replace("%::%</p>","",$text);
	$text = str_replace("%::%","",$text);

Well, that’s enough of that.

Similar Posts:

    None Found

| Tagged Development, Rants, Software, Textile

« Previous Next »

Lijit Search

Tags

.Net .Net 2008 Scripting Games Automation Bugs Design Development Funny Gadgets GeoShell GUI Huddled Masses Internet licensing Microsoft Modules My Software News Personal PInvoke Pipeline Politics PoshCode PoshConsole PowerBoots PowerShell PowerShell Functions PowerTips Rants Recommender Repository Scripting ShowUI Software Solutions Textile Tips User Group UserInterface WalkThrough WebHosting Windows 7 WordPress WPF Xml

About Huddled Masses

This is web site is dedicated to the musings of Joel Bennett (aka Jaykul) about technology, software, software development, the web, and the world.

Any resemblance of the views expressed and the views of my employer, my terminal, or the view out my window are purely coincidental. The resemblance between them and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader.

P.S.: I occasionally link to things I think are great. When I do, I occasionally find a "referral code" so I can make a little cash. I promise that I don't link to anything just because of that cash (I wouldn't cross the street for the amount of cash those links bring in, never mind write a whole blog post) ... but I do not promise that things I link to will stay great as time passes, nor that you will agree with me about their greatness!

Archives

  • January 2012
  • October 2011
  • August 2011
  • July 2011
  • June 2011
  • March 2011
  • February 2011
  • January 2011
  • November 2010
  • August 2010

Copyright © 2012 Joel Bennett.

Powered by WordPress and Hybrid.