镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Stricter RegExps #378

Description

@avivkeller

Currently, our RegExps are a bit loose to allow for slight inaccuracies in the core documentation, however, this leads to things being matches that should not be matched.

For example, as shown below, CMake.js treated as a property (https://nodejs-api-docs-tooling.vercel.app/n-api.html#cmakejs):
Image

This is because our RegExp (currently /^(?:Class property: +)?`?[A-Z]\w+(?:\.[A-Z]\w+)*(?:(\[\w+\.\w+\])|\.(\w+))`?$/i) does not require the "Class property:" designation, nor the `backticks` wrapping. We should fix any/all inaccuracies in core, and make these RegExps stricter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions