Skip to content

page hook: page.content is a string, not a list of parsed sections #4

@bguiz

Description

@bguiz

hook.page claims that:

        // page.content is a list of parsed sections

See; https://github.com/GitbookIO/plugin/blob/master/index.js#L59

However, this is not the case - page.content really is just a string containing the markdown for the currently processed input file; which makes the page hook no different from the page:before hook. When implementing a plugin, add the following statement to each of the hooks to verify.

        console.log('typeof page.content:', (typeof page.content));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions