Skip to content

Syntax Error: Invalid regular expression in vuepress-plugin-versioning #170

@wyattis

Description

@wyattis

The plugin appears to be trying to create a regular expression with the full path to a directory, but it fails on Windows for some reason.

SyntaxError: Invalid regular expression: /^/C:\Users\user\site\website\versioned_docs\/: \ at end of pattern
    at new RegExp (<anonymous>)
    at extendPageData (C:\Users\user\site\node_modules\vuepress-plugin-versioning\index.js:155:61)
    at C:\Users\user\site\node_modules\@vuepress\core\lib\node\Page.js:293:19
    at Array.map (<anonymous>)
    at Page.enhance (C:\Users\user\site\node_modules\@vuepress\core\lib\node\Page.js:290:17)
    at Page.process (C:\Users\user\site\node_modules\@vuepress\core\lib\node\Page.js:148:16)
    at async App.addPage (C:\Users\user\site\node_modules\@vuepress\core\lib\node\App.js:354:5)
    at async C:\Users\user\site\node_modules\@vuepress\core\lib\node\App.js:120:9
    at async Promise.all (index 80)

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