Skip to content

Commit

Permalink
avoid removing file extension when sanitizing filename
Browse files Browse the repository at this point in the history
  • Loading branch information
kbravh committed Nov 10, 2021
1 parent ecdeaf3 commit e7f44cb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-tweet-to-markdown",
"name": "Tweet to Markdown",
"version": "1.1.1",
"version": "1.1.2",
"minAppVersion": "0.12.16",
"description": "Save tweets as Markdown files, along with their images, polls, etc.",
"author": "kbravh",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-tweet-to-markdown",
"version": "1.1.1",
"version": "1.1.2",
"description": "Save tweets as beautiful markdown files in Obsidian (https://obsidian.md)",
"main": "main.js",
"engines": {
Expand Down
3 changes: 1 addition & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ export const createFilename = (tweet: Tweet, filename = ''): string => {
filename = filename.replace('[[handle]]', tweet.includes.users[0].username)
filename = filename.replace('[[id]]', tweet.data.id)
filename = filename.replace('[[text]]', tweet.data.text)
filename += '.md'
return sanitize(filename)
return sanitize(filename) + '.md'
}

/**
Expand Down
2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"1.1.1": "0.12.16"
"1.1.2": "0.12.16"
}

0 comments on commit e7f44cb

Please sign in to comment.