Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
cspell-grammar
Advanced tools
cspell-grammar
CSpell Grammar is used to generate a parser. The Parser is used to add context / scope to parts of a document, making it easier to define the parts to spell spell checked.
This is to address the issues and limitations related to ignoreRegExpList
and includeRegExpList
.
The parser is use to add scope
to sections of a document. The scope
can then be used to apply spell checking rules.
Example: Only check comments and strings
rules:
'*': false
comment: true
string: true
It can be even more powerful like controlling the language settings based upon scope.
rules:
comment:
language: en
string:
language: en,fr
dictionaries: ['marketing-terms'],
caseSensitive: true
string.javascript:
caseSensitive: false
Rules are applied in the order they match the scope of the text.
When checking JavaScript files with the above example rules:
en,fr
marketing-terms
dictionary will be enabledcaseSensitive
will be true
en
caseSensitive
will be false
At its core, cspell-grammar
uses a simplified form of the TextMate grammar.
Why use a grammar parser? Couldn't a colorizer / highlighter or a language AST be used? At one level, needs of the spell checker are simpler and different from colorizers or language AST parsers. The goal of a spell checker is to spell check relevant text. The spell check does not need to care about the syntactical correctness of a document or presentation.
The goal of a grammar parser for the spell checker is to allow the user to decide:
Note: CSpell is a pure JavaScript application, so including the Oniguruma is not an option.
Consider the following bit of LaTeX:
k\"{o}nnen
können
For the spell checker to work correctly, the \"{o}
should be transformed into ö
before it is checked against the German dictionary.
This creates a few challenges.
Possible options:
8.5.0 (2024-03-01)
Note: Version bump only for package cspell-monorepo
FAQs
Grammar parsing support for cspell
The npm package cspell-grammar receives a total of 650,708 weekly downloads. As such, cspell-grammar popularity was classified as popular.
We found that cspell-grammar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.