Skip to content

Commit 18fc064

Browse files
committed
change to dash case
1 parent fe86c12 commit 18fc064

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

main.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class QuickShareNotePlugin extends Plugin {
3737
let fileContent = await this.app.vault.read(activeFile);
3838
let updatedContent = await this.uploadImagesAndReplaceLinks(fileContent);
3939

40-
const gistIdMatch = updatedContent.match(/gistPublishUrl: https.*\/(.*)/);
40+
const gistIdMatch = updatedContent.match(/gist-publish-url: https.*\/(.*)/);
4141

4242
if (!this.settings.showFrontmatter) {
4343
updatedContent = updatedContent.replace(/^---\n[\s\S]*?\n---\n/, ''); // Remove frontmatter if setting is false
@@ -114,12 +114,12 @@ export default class QuickShareNotePlugin extends Plugin {
114114

115115
if (match) {
116116
const frontmatter = match[1];
117-
const updatedFrontmatter = frontmatter.includes('gistPublishUrl')
118-
? frontmatter.replace(/gistPublishUrl: .*/, `gistPublishUrl: ${url}`)
119-
: `${frontmatter}\ngistPublishUrl: ${url}`;
117+
const updatedFrontmatter = frontmatter.includes('gist-publish-url')
118+
? frontmatter.replace(/gist-publish-url: .*/, `gist-publish-url: ${url}`)
119+
: `${frontmatter}\ngist-publish-url: ${url}`;
120120
newContent = fileContent.replace(frontmatterRegex, `---\n${updatedFrontmatter}\n---`);
121121
} else {
122-
newContent = `---\ngistPublishUrl: ${url}\n---\n${fileContent}`;
122+
newContent = `---\ngist-publish-url: ${url}\n---\n${fileContent}`;
123123
}
124124

125125
await this.app.vault.modify(file, newContent);

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "quick-share-note-to-gist",
33
"name": "Quick Share Note to gist",
4-
"version": "1.0.16",
4+
"version": "1.0.17",
55
"minAppVersion": "0.15.0",
66
"description": "Quick share notes to GitHub gist and its image by upload images to Imgur.",
77
"author": "Por Chainarong Tangsurakit",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quick-share-note-to-gist",
3-
"version": "1.0.16",
3+
"version": "1.0.17",
44
"description": "Quick share notes to GitHub gist and its image by upload images to Imgur (https://github.com/chaintng/quick-share-note-to-gist)",
55
"main": "main.js",
66
"scripts": {

0 commit comments

Comments
 (0)