Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Mar 19, 2024
1 parent 0078b64 commit 22141cd
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 40 deletions.
44 changes: 21 additions & 23 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/javascript-node
{
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": { "VARIANT": "16" }
},
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": {"VARIANT": "16"}
},

// Set *default* container specific settings.json values on container create.
"settings": {},
// Set *default* container specific settings.json values on container create.
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
],
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["dbaeumer.vscode-eslint"],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"git": "latest"
}
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"git": "latest"
}
}
20 changes: 10 additions & 10 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm install
- run: npm run build --if-present
- run: npm test
env:
CI: true
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm install
- run: npm run build --if-present
- run: npm test
env:
CI: true
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
- name: Publish to GHPR
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {install as installImageLink, uninstall as uninstallImageLink} from './pa
import {install as installLink, uninstall as uninstallLink} from './paste-markdown-link'
import {
installAround as installSkipFormatting,
uninstall as uninstallSkipFormatting
uninstall as uninstallSkipFormatting,
} from './paste-keyboard-shortcut-helper'
import {install as installTable, uninstall as uninstallTable} from './paste-markdown-table'
import {install as installText, uninstall as uninstallText} from './paste-markdown-text'
Expand All @@ -23,7 +23,7 @@ function subscribe(el: HTMLElement, optionConfig?: OptionConfig): Subscription {
uninstallImageLink(el)
uninstallLink(el)
uninstallText(el)
}
},
}
}

Expand All @@ -38,5 +38,5 @@ export {
uninstallImageLink,
uninstallTable,
uninstallLink,
uninstallText
uninstallText,
}
2 changes: 1 addition & 1 deletion src/paste-keyboard-shortcut-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function shouldSkipFormatting(el: HTMLElement): boolean {
export function installAround(
el: HTMLElement,
installCallbacks: Array<(el: HTMLElement, optionConfig?: OptionConfig) => void>,
optionConfig?: OptionConfig
optionConfig?: OptionConfig,
): void {
el.addEventListener('keydown', setSkipFormattingFlag)

Expand Down
2 changes: 1 addition & 1 deletion src/paste-markdown-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function onPaste(event: ClipboardEvent) {
const parser = new DOMParser()
const doc = parser.parseFromString(textHTMLClean, 'text/html')
const walker = doc.createTreeWalker(doc.body, NodeFilter.SHOW_ELEMENT, node =>
node.parentNode && isLink(node.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
node.parentNode && isLink(node.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT,
)

const markdown = convertToMarkdown(plaintext, walker)
Expand Down

0 comments on commit 22141cd

Please sign in to comment.