• When using WP syntax on a page that is split in multiple pages using nextpage and WP syntax is used on every page then the code of WP syntax is loading the contents of the first page only.
    For example consider having the following page:
    Content
    ….
    code using wp-syntax #1
    ….
    code using wp-syntax #2

    nextpage
    ….
    code using wp-syntax #3
    ….
    code using wp-syntax #4

    code using wp-syntax #5

    When the above is rendered, page #2 is showing

    code using wp-syntax #1
    code using wp-syntax #2
    code using wp-syntax #5

    Is this a bug?

Viewing 1 replies (of 1 total)
  • Thread Starter axaros

    (@axaros)

    OK, I found a workaround:

    self::$cache_match_num is resetting every time the page changes. This means that is starts from 0 again so it loads the wp-syntax contents of the first page.
    A workaround is to offset cache depending on page e.g.

    public static function afterFilterContent( $content ) {
    global $post, $page;

    self::$cache_match_num = ($page – 1) * 10;

Viewing 1 replies (of 1 total)
  • The topic ‘Syntax highlighting on multipaged content.’ is closed to new replies.