Skip to content

Commit 69b82c5

Browse files
committed
Cleanups
1 parent 2f2f4ef commit 69b82c5

File tree

5 files changed

+2
-5
lines changed

5 files changed

+2
-5
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ And while both plugins are about maps and use Leaflet.js as their visual engine,
685685

686686
- Inconsistency in front matter format (https://github.com/esm7/obsidian-map-view/issues/288).
687687
- Inline tags don't work without a trailing space (https://github.com/esm7/obsidian-map-view/issues/286).
688+
- Inline geolocation suggestion fails for lines that contain wikilinks (https://github.com/esm7/obsidian-map-view/issues/299).
688689

689690
**Under the Hood:**
690691

src/locationSearchDialog.ts

-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ export class LocationSearchDialog extends SuggestModal<SuggestInfo> {
158158
const locationString = `${location.lat},${location.lng}`;
159159
utils.verifyOrAddFrontMatter(
160160
this.app,
161-
this.editor,
162161
this.file,
163162
this.settings.frontMatterKey,
164163
locationString,

src/main.ts

-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ export default class MapViewPlugin extends Plugin {
137137
const locationString = `"${location.lat},${location.lng}"`;
138138
utils.verifyOrAddFrontMatter(
139139
this.app,
140-
editor,
141140
file,
142141
this.settings.frontMatterKey,
143142
locationString,

src/mapContainer.ts

-1
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,6 @@ export class MapContainer {
930930
if (marker.isFrontmatterMarker) {
931931
await utils.verifyOrAddFrontMatter(
932932
this.app,
933-
null,
934933
marker.file,
935934
this.settings.frontMatterKey,
936935
`${newLat},${newLng}`,

src/utils.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ export async function goToEditorLocation(
166166
// Returns true if a change to the note was made.
167167
export async function verifyOrAddFrontMatter(
168168
app: App,
169-
editor: Editor,
170169
file: TFile,
171170
fieldName: string,
172171
fieldValue: string,
@@ -203,7 +202,7 @@ export async function verifyOrAddFrontMatterForInline(
203202
)
204203
return false;
205204
// Otherwise, verify this note has a front matter with an empty 'locations' tag
206-
return await verifyOrAddFrontMatter(app, editor, file, 'locations', '');
205+
return await verifyOrAddFrontMatter(app, file, 'locations', '');
207206
}
208207

209208
/**

0 commit comments

Comments
 (0)