Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 50 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -485,13 +485,15 @@
"@types/lodash.throttle": "^4.1.3",
"@types/mocha": "^9.0.0",
"@types/node": "^8.10.66",
"@types/vscode": "^1.31.0",
"@typescript-eslint/eslint-plugin": "^4.31.1",
"@typescript-eslint/parser": "^4.31.1",
"copy-webpack-plugin": "^9.0.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-config-standard": "^16.0.3",
"lodash.throttle": "^4.1.1",
"mocha": "^9.1.3",
"mocha-junit-reporter": "^1.23.3",
Expand All @@ -509,15 +511,11 @@
"@asciidoctor/core": "2.2.6",
"@asciidoctor/docbook-converter": "^2.0.0",
"@orcid/bibtex-parse-js": "^0.0.25",
"@types/vscode": "^1.31.0",
"asciidoctor-kroki": "^0.15.4",
"eslint-config-standard": "^16.0.3",
"file-url": "^3.0.0",
"follow-redirects": "^1.14.7",
"https-proxy-agent": "^4.0.0",
"moment": "^2.14.1",
"uuid": "^8.3.2",
"vscode-nls": "^4.1.1",
"vscode-test": "^1.4.0"
"vscode-nls": "^4.1.1"
}
}
10 changes: 6 additions & 4 deletions src/image-paste.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as path from 'path'
import * as vscode from 'vscode'
import { spawn } from 'child_process'
import * as moment from 'moment'
import * as fs from 'fs'

import { AsciidocParser } from './asciidocParser'
Expand Down Expand Up @@ -143,9 +142,12 @@ export namespace Import {

const editor = vscode.window.activeTextEditor

let filename = moment()
.format('d-M-YYYY-HH-mm-ss-A.png')
.toString() //default filename
const currentDateString = new Date()
.toISOString()
.replace(':', '-')
.replace('.', '-')
//default filename
let filename = `${currentDateString}.png`
let alttext = '' //todo:...
const directory = await this.getCurrentImagesDir()

Expand Down