
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
lang-tex
This is the TeX extension for CodeMirror 6.
Since TeX can change its notation during parsing, we can't expect any semantic meaning in any given command. However, there are a lot of best practices with TeX, so this project, along with lezer-tex
, are based on these best practices.
For the syntax extension, you must call texSyntax
:
import { texSyntax } from "lang-tex";
const syntax = texSyntax();
It can take an optional object that specifies what TagSystem
to use via the tagSystem
key.
Remark: The tag system must extend the default CodeMirror tag system. By default, we use our TeX tag system, as opposed to the default CodeMirror tag system.
We currently provide a light theme extension accessible via texLightTheme
. In order to use this theme however, the tag system must be our TeX tag system. You can create your own theme by using the highlighter
function of our TeXTagSystem
like so:
import { TeXTagSystem } from "lang-tex";
const highlighter = TeXTagSystem.highlighter(...ReactCSSStyleLikeObject)
We currently only provide MathJax snippets. You can provide your own by following the CodeMirror autocomplete
module docs.
MVP:
import { mathjaxSnippets, texSyntax, TeXTagSystem } from "../dist";
import { autocompletion } from "@codemirror/next/autocomplete";
// You must declare the syntax as a variable
const syntax = texSyntax();
// Adding the mathjax snippets to the syntax.
const texSupport = [syntax, syntax.languageData.of({ autocomplete: mathjaxSnippets })];
// DON'T FORGET THE `autocomplete` EXTENSION ITSELF!
const autocompleteExt = [autocompletion()].concat(texSupport)
Since TeX can be used everywhere, we welcome suggestions for specific syntax with TeX (e.g. tikzpicture
syntax). You must provide an explicit BNF grammar (or BNF-like grammar).
FAQs
TeX extension for CodeMirror 6
The npm package lang-tex receives a total of 3 weekly downloads. As such, lang-tex popularity was classified as not popular.
We found that lang-tex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.