Testing Geshi

Feb 4 2009

I am testing the GeSHI syntax highlighting library. A Drupal module is available for adding GeSHI to the input filters. So... here goes.

<?php
require_once 'QueryPath/QueryPath.php';

qp(QueryPath::HTML_STUB, 'title')
  ->text('This is the title.')
  ->top()
  ->find('body')
  ->text('Hello world');
?>

The above should produce output looking something like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> This is the title Hello World It should have syntax highlighting and line numbers.