mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 19:46:23 +00:00
fix: callout parsing (#469)
This commit is contained in:
parent
4e23e67244
commit
a19df64be8
1 changed files with 3 additions and 1 deletions
|
@ -69,6 +69,8 @@ const callouts = {
|
||||||
const calloutMapping: Record<string, keyof typeof callouts> = {
|
const calloutMapping: Record<string, keyof typeof callouts> = {
|
||||||
note: "note",
|
note: "note",
|
||||||
abstract: "abstract",
|
abstract: "abstract",
|
||||||
|
summary: "abstract",
|
||||||
|
tldr: "abstract",
|
||||||
info: "info",
|
info: "info",
|
||||||
todo: "todo",
|
todo: "todo",
|
||||||
tip: "tip",
|
tip: "tip",
|
||||||
|
@ -96,7 +98,7 @@ const calloutMapping: Record<string, keyof typeof callouts> = {
|
||||||
|
|
||||||
function canonicalizeCallout(calloutName: string): keyof typeof callouts {
|
function canonicalizeCallout(calloutName: string): keyof typeof callouts {
|
||||||
let callout = calloutName.toLowerCase() as keyof typeof calloutMapping
|
let callout = calloutName.toLowerCase() as keyof typeof calloutMapping
|
||||||
return calloutMapping[callout] ?? calloutName
|
return calloutMapping[callout] ?? "note"
|
||||||
}
|
}
|
||||||
|
|
||||||
const capitalize = (s: string): string => {
|
const capitalize = (s: string): string => {
|
||||||
|
|
Loading…
Reference in a new issue