🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@github/markdown-toolbar-element

Package Overview
Dependencies
Maintainers
15
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/markdown-toolbar-element - npm Package Compare versions

Comparing version
1.3.1
to
1.3.2
+9
-1
dist/index.js

@@ -283,5 +283,13 @@ const buttonSelectors = [

const shortcutListeners = new WeakMap();
function findHotkey(toolbar, key) {
for (const el of toolbar.querySelectorAll('[hotkey]')) {
if (el.getAttribute('hotkey') === key) {
return el;
}
}
return null;
}
function shortcut(toolbar, event) {
if ((event.metaKey && modifierKey === 'Meta') || (event.ctrlKey && modifierKey === 'Control')) {
const button = toolbar.querySelector(`[hotkey="${event.key}"]`);
const button = findHotkey(toolbar, event.key);
if (button) {

@@ -288,0 +296,0 @@ button.click();

+8
-8
{
"name": "@github/markdown-toolbar-element",
"version": "1.3.1",
"version": "1.3.2",
"description": "Markdown formatting buttons for text inputs.",

@@ -12,3 +12,3 @@ "repository": "github/markdown-toolbar-element",

"clean": "rm -rf dist",
"lint": "github-lint",
"lint": "eslint src/*.ts test/*.js",
"prebuild": "npm run clean && npm run lint && mkdir dist",

@@ -33,11 +33,11 @@ "build": "tsc",

"chai": "^4.2.0",
"eslint": "^6.6.1",
"eslint-plugin-github": "^3.4.1",
"karma": "^5.0.9",
"eslint": "^7.6.0",
"eslint-plugin-github": "^4.1.1",
"karma": "^5.1.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-chrome-launcher": "^3.1.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"mocha": "^7.1.2",
"typescript": "^3.9.2"
"mocha": "^8.1.0",
"typescript": "^3.9.7"
},

@@ -44,0 +44,0 @@ "eslintIgnore": [