Skip to content

Commit

Permalink
Merge pull request #9 from liamcain/fix/handle-headings-with-wikilinks
Browse files Browse the repository at this point in the history
Fix regex that detects markdown headings
  • Loading branch information
liamcain authored Mar 19, 2021
2 parents 4adaa06 + 008db08 commit b3b5045
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "things-logbook",
"name": "Things Logbook",
"description": "Sync your Things.app Logbook with Daily Notes",
"version": "0.1.8",
"version": "0.1.9",
"author": "Liam Cain",
"authorUrl": "https://github.com/liamcain/",
"isDesktopOnly": true,
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-things-logbook-plugin",
"version": "0.1.8",
"version": "0.1.9",
"description": "Sync Things.app Logbook with Obsidian",
"author": "liamcain",
"main": "main.js",
Expand Down
2 changes: 1 addition & 1 deletion src/textUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { App, TFile } from "obsidian";
import { getEditorForFile } from "./fileUtils";

export function getHeadingLevel(line = ""): number | null {
const heading = line.match(/^(#{1,6})\s\b/);
const heading = line.match(/^(#{1,6})\s+\S/);
return heading ? heading[1].length : null;
}

Expand Down

0 comments on commit b3b5045

Please sign in to comment.