Help for this page

Select Code to Download


  1. or download this
      * A line like
        this one.
    
  2. or download this
      sub format {
          my $self = shift;
          my $source = shift;
    ...
    
          return cleanup_html($html);
    }
    
  3. or download this
      sub classify_line { # return (indent, type, modified_line, info)
          local $_ = shift;
    
    ...
          s/^(\s*)//           && return (length($1), $PLAIN, $_, undef);
          die "classify_line:\n\t" . $_ . "\n";
      }
    
  4. or download this
    sub maybe_new_scope {
    
    #    if the "enter new scope" rule for the current scope fires then
    ...
    
        return 0;
    }
    
  5. or download this
    my %rulesets = (
        # The "null" ruleset exists to force us into an initial scope
        0 => {
    ...
                sub { emit("</pre>\n") },
        }
    );
    
  6. or download this
    # The HTML that we've generated may need to be cleaned up. By deferrin
    +g
    # cleanup, the algorithms above can be simpler.
    #
    ...
    
        return $html;
    }