Skip to content

Commit bd17082

Browse files
committed
different approach
1 parent c2e6ffe commit bd17082

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

src/Text/Pandoc/Extensions.hs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,28 @@ getAllExtensions f = universalExtensions <> getAll f
548548
getAll "markdown_mmd" = allMarkdownExtensions
549549
getAll "markdown_github" = allMarkdownExtensions
550550
getAll "markdown" = allMarkdownExtensions
551-
getAll "obsidian" = getAll "commonmark"
551+
getAll "obsidian" = extensionsFromList
552+
[ Ext_ascii_identifiers
553+
, Ext_alerts
554+
, Ext_attributes
555+
, Ext_autolink_bare_uris
556+
, Ext_block_ids
557+
, Ext_comments
558+
, Ext_footnotes
559+
, Ext_hard_line_breaks
560+
, Ext_mark
561+
, Ext_pipe_tables
562+
, Ext_raw_html
563+
, Ext_rebase_relative_paths
564+
, Ext_strikeout
565+
, Ext_task_lists
566+
, Ext_tex_math_dollars
567+
, Ext_wikilink_block_transclusions
568+
, Ext_wikilink_heading_transclusions
569+
, Ext_wikilink_transclusions
570+
, Ext_wikilinks_title_after_pipe
571+
, Ext_yaml_metadata_block
572+
]
552573
getAll "ipynb" = allMarkdownExtensions <> extensionsFromList
553574
[ Ext_raw_markdown ]
554575
getAll "docx" = autoIdExtensions <> extensionsFromList

test/command/obsidian.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,35 @@ A paragraph with a block ID. ^my-id
1818
% pandoc -f obsidian -t native
1919
An embed: ![[myfile.md]]
2020
^D
21-
[ Para [ Str "An" , Space , Str "embed:" , Space ] ]
21+
[ Para [ Str "An" , Space , Str "embed:" , Space , Span ( "" , [] , [] ) [ Str "![[myfile.md]]" ] ] ]
2222
```
2323

2424
```
2525
% pandoc -f obsidian -t native
2626
A block reference embed: ![[myfile.md#^my-id]]
2727
^D
28-
[ Para [ Str "A" , Space , Str "block" , Space , Str "reference" , Space , Str "embed:" , Space ] ]
28+
[ Para [ Str "A" , Space , Str "block" , Space , Str "reference" , Space , Str "embed:" , Space , Span ( "" , [] , [] ) [ Str "![[myfile.md#^my-id]]" ] ] ]
2929
```
3030

3131
```
3232
% pandoc -f obsidian -t native
3333
A wikilink transclusion: ![[my-wikilink]]
3434
^D
35-
[ Para [ Str "A" , Space , Str "wikilink" , Space , Str "transclusion:" , Space ] ]
35+
[ Para [ Str "A" , Space , Str "wikilink" , Space , Str "transclusion:" , Space , Span ( "" , [] , [] ) [ Str "![[my-wikilink]]" ] ] ]
3636
```
3737

3838
```
3939
% pandoc -f obsidian -t native
4040
A block transclusion: ![[myfile#^my-id]]
4141
^D
42-
[ Para [ Str "A" , Space , Str "block" , Space , Str "transclusion:" , Space ] ]
42+
[ Para [ Str "A" , Space , Str "block" , Space , Str "transclusion:" , Space , Span ( "" , [] , [] ) [ Str "![[myfile#^my-id]]" ] ] ]
4343
```
4444

4545
```
4646
% pandoc -f obsidian -t native
4747
A heading transclusion: ![[myfile#Introduction]]
4848
^D
49-
[ Para [ Str "A" , Space , Str "heading" , Space , Str "transclusion:" , Space ] ]
49+
[ Para [ Str "A" , Space , Str "heading" , Space , Str "transclusion:" , Space , Span ( "" , [] , [] ) [ Str "![[myfile#Introduction]]" ] ] ]
5050
```
5151

5252
```

0 commit comments

Comments
 (0)