Skip to content

Commit

Permalink
bump version. remove unsued imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kortina committed Jul 12, 2020
1 parent c6bb03c commit c6d97c1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [v0.0.12](https://github.com/kortina/vscode-markdown-notes/releases/edit/v0.0.12) (2020-07-12)

Configurable template for new notes.

**Enhancements:**

- Adds new config, `vscodeMarkdownNotes.newNoteTemplate`: Template for auto-created note files. Available tokens: ${noteName}, ${timestamp}. Timestamp is inserted in ISO format, i.e. 2020-07-09T05:29:00.541Z.

Tx @qbikez for #49 closes #48

## [v0.0.11](https://github.com/kortina/vscode-markdown-notes/releases/edit/v0.0.11) (2020-07-08)

Many bugfixes from [foam](https://github.com/foambubble/foam) community.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-markdown-notes",
"displayName": "Markdown Notes",
"description": "Navigate notes with [[wiki-links]], backlinks, and #tags (like Bear, Roam, etc). Automatically create notes from new inline [[wiki-links]]. Use Peek Definition to preview linked notes.",
"version": "0.0.11",
"version": "0.0.12",
"publisher": "kortina",
"repository": {
"url": "https://github.com/kortina/vscode-markdown-notes.git",
Expand Down
11 changes: 5 additions & 6 deletions src/NoteWorkspace.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as vscode from 'vscode';
import { basename, dirname, join, normalize, relative, resolve } from 'path';
import { existsSync, readFile, writeFileSync } from 'fs';
import { config } from 'process';
import { basename, dirname, join, normalize, relative } from 'path';
import { existsSync, writeFileSync } from 'fs';

export const foo = () => {
return 1;
Expand Down Expand Up @@ -56,7 +55,7 @@ export class NoteWorkspace {
noteCompletionConvention: NoteCompletionConvention.rawFilename,
slugifyCharacter: SlugifyCharacter.dash,
workspaceFilenameConvention: WorkspaceFilenameConvention.uniqueFilenames,
newNoteTemplate: NoteWorkspace._defaultNoteTemplate
newNoteTemplate: NoteWorkspace._defaultNoteTemplate,
};
static DOCUMENT_SELECTOR = [
// { scheme: 'file', language: 'markdown' },
Expand All @@ -77,7 +76,7 @@ export class NoteWorkspace {
workspaceFilenameConvention: c.get(
'workspaceFilenameConvention'
) as WorkspaceFilenameConvention,
newNoteTemplate: c.get('newNoteTemplate') as string
newNoteTemplate: c.get('newNoteTemplate') as string,
};
}

Expand Down Expand Up @@ -272,7 +271,7 @@ export class NoteWorkspace {
static newNoteContent(noteName: string) {
const template = NoteWorkspace.newNoteTemplate();
const contents = template
.replace(/\\n/g, "\n")
.replace(/\\n/g, '\n')
.replace(/\$\{noteName\}/g, noteName)
.replace(/\$\{timestamp\}/g, new Date().toISOString());
return contents;
Expand Down

0 comments on commit c6d97c1

Please sign in to comment.