WordPress.org

Plugin Directory

wp-syntax

Opened 7 years ago

Closed 7 years ago

#532 closed enhancement (fixed)

Add support for line numbers

Reported by: rmm5t Owned by: rmm5t
Priority: normal Severity: normal
Plugin: wp-syntax Keywords:
Cc:

Description

Add support for line numbers, but don't implement it using the built in line number generation in GeSHi. I prefer that this plugin continue to output <pre> tagged output, and also maintain valid XHTML output. GeSHi's use of <ol> and <li> tags for line numbering unfortunately forces some unexpected rendering and potentially invalid XHTML.

The idea is to support a new line attribute that takes a line number as the value. When this is present, line numbers will start at the line number specified.

Also, copy-n-pasting in all browsers should be supported such that the line numbers don't get copied along with the code. GeSHi's output currently causes problems with this in Firefox.

Change History (1)

comment:1 rmm5t7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Line number support was added by using a table. The left cell contains the line numbers. The right cell contains the code. This is only generated if a line attribute is passed to the <pre> tag along with the lang attribute.

Added in changeset [7682]

Note: See TracTickets for help on using tickets.