Skip to content

Stricter RegExpsΒ #378

@avivkeller

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions