Skip to content

Commit

Permalink
Revert "Merge pull request #86 from TheColorman/main"
Browse files Browse the repository at this point in the history
This reverts commit 4d24ba4, reversing
changes made to eebc70b.
  • Loading branch information
alangrainger committed Apr 5, 2024
1 parent 4d24ba4 commit b0a756c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/note.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CachedMetadata, FileSystemAdapter, moment, requestUrl, TFile, View, WorkspaceLeaf, Platform } from 'obsidian'
import { CachedMetadata, FileSystemAdapter, moment, requestUrl, TFile, View, WorkspaceLeaf } from 'obsidian'
import { encryptString, sha1 } from './crypto'
import SharePlugin from './main'
import StatusMessage, { StatusType } from './StatusMessage'
Expand Down Expand Up @@ -336,12 +336,9 @@ export default class Note {
let content
let filepath = ''
if (src.startsWith('app://')) {
const srcMatch = src.match(/app:\/\/\w+(\/[^?#]+)/)
const srcMatch = src.match(/app:\/\/\w+\/([^?#]+)/)
if (srcMatch) {
filepath = window.decodeURIComponent(srcMatch[1])
if (!Platform.isLinux) {
filepath = filepath.slice(1);
}
content = await FileSystemAdapter.readLocalFile(filepath)
}
} else if (src.match(/^https?:\/\/localhost/) || !src.startsWith('http')) {
Expand Down

0 comments on commit b0a756c

Please sign in to comment.