https://github.com/cmac2112/obby-parser
package that can parse markdown files and pick out links from text in an obsidian like fashion
https://github.com/cmac2112/obby-parser
markdown obsidian parser
Last synced: about 2 months ago
JSON representation
package that can parse markdown files and pick out links from text in an obsidian like fashion
- Host: GitHub
- URL: https://github.com/cmac2112/obby-parser
- Owner: cmac2112
- License: mit
- Created: 2025-11-09T03:48:40.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-02-07T21:54:41.000Z (5 months ago)
- Last Synced: 2026-02-08T05:58:18.901Z (5 months ago)
- Topics: markdown, obsidian, parser
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/obby-parser
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Obby-Parser
A simple TypeScript library for parsing Obsidian-style markdown. It converts `[[wikilinks]]` to HTML anchor tags and collects all unique links.
## Features
- Converts `[[Page Name]]` to `Page Name`
- Collects all wikilinks in a Set
- Supports standard markdown formatting via [markdown-it](https://github.com/markdown-it/markdown-it)
## Installation
```bash
npm install obsi-parser
```
## Usage
```typescript
import { parseMarkdown } from 'obsi-parser';
const markdown = "This references [[My Page]] and also **bold** text.";
const result = parseMarkdown(markdown, "pages/");
console.log(result.html); // HTML output with anchor tags
console.log(result.links_set); // Set { "My Page" }
```
## API
### `parseMarkdown(markdown: string, route: string): ParseResult`
- `markdown`: The markdown string to parse.
- `route`: The base path for generated links.
- Returns:
- `html`: The resulting HTML string.
- `links_set`: A Set of all unique wikilinks found.
## License
MIT