MARKDOWNMAP
in package
MARKDOWNMAP class
Map between Obsidian's markdown and HTML
Table of Contents
Properties
- $markdownMap : mixed
- array
Properties
$markdownMap
array
public
mixed
$markdownMap
= [
// Headings
'# ' => '<h1>$1</h1>',
'## ' => '<h2>$1</h2>',
'### ' => '<h3>$1</h3>',
'#### ' => '<h4>$1</h4>',
'##### ' => '<h5>$1</h5>',
'###### ' => '<h6>$1</h6>',
// Emphasis
'**$1**' => '<strong>$1</strong>',
'__$1__' => '<strong>$1</strong>',
'*$1*' => '<em>$1</em>',
'_$1_' => '<em>$1</em>',
// Inline code
'`$1`' => '<code>$1</code>',
// Links
'[$1]($2)' => '<a href="$1">$2</a >',
'[[$1]]' => '<a href="$1">$1</a >',
'[[${1}|$2]]' => '<a href="$1">$2</a >',
// Images
'' => '< img src="$2" alt="$1">',
// Blockquotes
'> $1' => '<blockquote>$1</blockquote>',
// Horizontal rule
'---' => '<hr>',
'***' => '<hr>',
// Lists
'- $1' => '<li>$1</li>',
'* $1' => '<li>$1</li>',
'+ $1' => '<li>$1</li>',
'$1. $2' => '<li>$2</li>',
/**
* Stuff to ignore
*/
// '~~$1~~' => '<del>$1</del>',
// Obsidian tags
'#$1' => '',
// '#$1' => '<a href="/tags/$1" class="tag">#$1</a >',
// Obsidian highlights
'==$1==' => '',
// '==$1==' => '<mark>$1</mark>',
// Obsidian comments
'%%$1%%' => '',
// Task lists
'- [ ] $1' => '',
'- [x] $1' => '',
]