diff --git a/CHANGELOG.md b/CHANGELOG.md
index ffd9c833..4fa9c66e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
All notable changes to the "Znuny" extension will be documented in this file.
+## [1.1.6]
+
+### QuoteWithMarker
+
+- Updated README.md.
+- Tidied code.
+
## [1.1.5]
### QuoteWithMarker
diff --git a/README.md b/README.md
index 66c339a8..14f19c01 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
| Versions | Status |
| ------ | ------ |
-| ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.0) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.4) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.5)
![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%207.0) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/DK4/dev) | [![GitHub commits since tagged version](https://img.shields.io/github/commits-since/dennykorsukewitz/VSCode-Znuny/1.1.5/dev)](https://github.com/dennykorsukewitz/VSCode-Znuny/compare/1.1.5...dev) ![GitHub Workflow Lint](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/lint.yml/badge.svg?branch=dev&style=flat&label=Lint) [![Snippet](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/snippet.yml/badge.svg)](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/snippet.yml) ![GitHub Workflow Pages](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/pages.yml/badge.svg?branch=dev&style=flat&label=GitHub%20Pages) |
+| ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.0) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.4) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.5)
![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%207.0) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/DK4/dev) | [![GitHub commits since tagged version](https://img.shields.io/github/commits-since/dennykorsukewitz/VSCode-Znuny/1.1.6/dev)](https://github.com/dennykorsukewitz/VSCode-Znuny/compare/1.1.6...dev) ![GitHub Workflow Lint](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/lint.yml/badge.svg?branch=dev&style=flat&label=Lint) [![Snippet](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/snippet.yml/badge.svg)](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/snippet.yml) ![GitHub Workflow Pages](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/pages.yml/badge.svg?branch=dev&style=flat&label=GitHub%20Pages) |
## Features
@@ -52,7 +52,9 @@ Statically created snippets.
- Needed
- Perl
- POD
+- Scaffolding
- Selenium
+- SOPM
- VariableCheck
#### Generated
diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 00000000..4337c2d5
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,4 @@
+## QuoteWithMarker
+
+- Updated README.md.
+- Tidied code.
diff --git a/package.json b/package.json
index 8ebdad60..635a78ff 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "znuny",
"displayName": "Znuny",
"description": "Znuny is an extension that helps you to make Znuny development easier, faster and more error-free.",
- "version": "1.1.5",
+ "version": "1.1.6",
"publisher": "dennykorsukewitz",
"icon": "doc/images/icon.png",
"license": "SEE LICENSE IN LICENSE",
@@ -142,7 +142,7 @@
"order": 1,
"type": "string",
"description": "Znuny Code Marker used in QuoteWithMarker function.",
- "default": "Znuny"
+ "default": "Znuny - ${year}.${month}.${day}"
},
"znuny.quoteWithMarker.lineComment": {
"order": 2,
@@ -6385,4 +6385,4 @@
}
]
}
-}
+}
\ No newline at end of file
diff --git a/src/extension.js b/src/extension.js
index fa5cf1fa..c77f6312 100644
--- a/src/extension.js
+++ b/src/extension.js
@@ -361,25 +361,26 @@ function initQuoteWithMarker(context) {
// Select current line if nothing is selected
if (selection.isEmpty == true) {
- activeEditor.selection = new vscode.Selection(selection.active.line, 0 ,selection.active.line, 99)
+ activeEditor.selection = new vscode.Selection(selection.active.line, 0, selection.active.line, 99);
selection = activeEditor.selection;
}
let text = activeEditor.document.getText(selection) || '';
+ let config = vscode.workspace.getConfiguration('znuny').get('quoteWithMarker');
let quoteChar,
codeMarkerReplace,
- codeMarker = vscode.workspace.getConfiguration('znuny').get('codeMarker') || 'Znuny',
- lineComment = vscode.workspace.getConfiguration('znuny').get('lineComment') || '',
- languageId = activeEditor.document.languageId;
+ codeMarker = config.codeMarker || 'Znuny',
+ lineComment = config.lineComment || {},
+ languageId = activeEditor.document.languageId;
- let currentTime = new Date()
+ let currentTime = new Date();
// returns the month (from 0 to 11)
let month = currentTime.getMonth() + 1;
// returns the day of the month (from 1 to 31);
- let day = currentTime.getDate()
+ let day = currentTime.getDate();
// returns the year (four digits)
let year = currentTime.getFullYear();
@@ -389,13 +390,13 @@ function initQuoteWithMarker(context) {
codeMarker = codeMarker.replace(/\${day}/g, day);
// Get quoteChar from config
- if (lineComment[languageId] && lineComment[languageId].length){
+ if (lineComment && lineComment[languageId] && lineComment[languageId].length) {
quoteChar = lineComment[languageId];
}
// If no quoteChar is set, try to use the default value of lineComment of the current language config
- if (quoteChar.length === 0 && languageId){
- let extensions = vscode.extensions.all;
+ if (quoteChar.length === 0 && languageId) {
+ let extensions = vscode.extensions.all;
let languagesData = extensions.filter((extension) => extension.packageJSON.name === languageId);
let languageExtensionPath = languagesData[0].extensionPath;