revolt-markdown
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -135,2 +135,10 @@ import { HtmlOptions } from './types/HtmlOptions'; | ||
}; | ||
nptable: { | ||
readonly order: number; | ||
readonly match: import("@khanacademy/simple-markdown").MatchFunction; | ||
readonly quality?: ((capture: import("@khanacademy/simple-markdown").Capture, state: import("@khanacademy/simple-markdown").State, prevCapture: string) => number) | undefined; | ||
readonly parse: (capture: import("@khanacademy/simple-markdown").Capture, nestedParse: Parser, state: import("@khanacademy/simple-markdown").State) => { | ||
[key: string]: any; | ||
}; | ||
} & import("@khanacademy/simple-markdown").ReactOutputRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
spoiler: import("@khanacademy/simple-markdown").ParserRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
@@ -161,3 +169,3 @@ strike: { | ||
}; | ||
u: { | ||
table: { | ||
readonly order: number; | ||
@@ -174,2 +182,3 @@ readonly match: import("@khanacademy/simple-markdown").MatchFunction; | ||
}; | ||
tex: import("@khanacademy/simple-markdown").ParserRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
url: { | ||
@@ -346,2 +355,10 @@ readonly order: number; | ||
}; | ||
nptable: { | ||
readonly order: number; | ||
readonly match: import("@khanacademy/simple-markdown").MatchFunction; | ||
readonly quality?: ((capture: import("@khanacademy/simple-markdown").Capture, state: import("@khanacademy/simple-markdown").State, prevCapture: string) => number) | undefined; | ||
readonly parse: (capture: import("@khanacademy/simple-markdown").Capture, nestedParse: Parser, state: import("@khanacademy/simple-markdown").State) => { | ||
[key: string]: any; | ||
}; | ||
} & import("@khanacademy/simple-markdown").ReactOutputRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
spoiler: import("@khanacademy/simple-markdown").ParserRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
@@ -372,3 +389,3 @@ strike: { | ||
}; | ||
u: { | ||
table: { | ||
readonly order: number; | ||
@@ -385,2 +402,3 @@ readonly match: import("@khanacademy/simple-markdown").MatchFunction; | ||
}; | ||
tex: import("@khanacademy/simple-markdown").ParserRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
url: { | ||
@@ -387,0 +405,0 @@ readonly order: number; |
@@ -158,2 +158,10 @@ export declare const rulesRevoltOnlyHtml: { | ||
}; | ||
nptable: { | ||
readonly order: number; | ||
readonly match: import("@khanacademy/simple-markdown").MatchFunction; | ||
readonly quality?: ((capture: import("@khanacademy/simple-markdown").Capture, state: import("@khanacademy/simple-markdown").State, prevCapture: string) => number) | undefined; | ||
readonly parse: (capture: import("@khanacademy/simple-markdown").Capture, nestedParse: import("@khanacademy/simple-markdown").Parser, state: import("@khanacademy/simple-markdown").State) => { | ||
[key: string]: any; | ||
}; | ||
} & import("@khanacademy/simple-markdown").ReactOutputRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
spoiler: import("@khanacademy/simple-markdown").ParserRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
@@ -184,3 +192,3 @@ strike: { | ||
}; | ||
u: { | ||
table: { | ||
readonly order: number; | ||
@@ -197,2 +205,3 @@ readonly match: import("@khanacademy/simple-markdown").MatchFunction; | ||
}; | ||
tex: import("@khanacademy/simple-markdown").ParserRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
url: { | ||
@@ -350,2 +359,10 @@ readonly order: number; | ||
}; | ||
nptable: { | ||
readonly order: number; | ||
readonly match: import("@khanacademy/simple-markdown").MatchFunction; | ||
readonly quality?: ((capture: import("@khanacademy/simple-markdown").Capture, state: import("@khanacademy/simple-markdown").State, prevCapture: string) => number) | undefined; | ||
readonly parse: (capture: import("@khanacademy/simple-markdown").Capture, nestedParse: import("@khanacademy/simple-markdown").Parser, state: import("@khanacademy/simple-markdown").State) => { | ||
[key: string]: any; | ||
}; | ||
} & import("@khanacademy/simple-markdown").ReactOutputRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
spoiler: import("@khanacademy/simple-markdown").ParserRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
@@ -376,3 +393,3 @@ strike: { | ||
}; | ||
u: { | ||
table: { | ||
readonly order: number; | ||
@@ -389,2 +406,3 @@ readonly match: import("@khanacademy/simple-markdown").MatchFunction; | ||
}; | ||
tex: import("@khanacademy/simple-markdown").ParserRule & import("@khanacademy/simple-markdown").HtmlOutputRule; | ||
url: { | ||
@@ -391,0 +409,0 @@ readonly order: number; |
@@ -16,2 +16,5 @@ import { AttributeValue } from './AttributeValue'; | ||
}; | ||
tex?: (node: { | ||
content: string; | ||
}) => Partial<Record<any, AttributeValue>>; | ||
timestamp?: (node: { | ||
@@ -18,0 +21,0 @@ timestamp: number; |
{ | ||
"name": "revolt-markdown", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A markdown parser for Revolt messages", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -38,6 +38,7 @@ # revolt-markdown | ||
* `emojiToUnicode`: Boolean (default: true), if the default emojis should be converted to unicode | ||
* `revoltCallback`: Object, callbacks used for discord parsing. Each (except `spoilerAttrib`) receive an object with different properties, and (except `emoji`) are expected to return an HTML escaped string | ||
* `revoltCallback`: Object, callbacks used for discord parsing. Each (except `spoilerAttrib`) receive an object with different properties, and (except `emoji` and `tex`) are expected to return an HTML escaped string | ||
* `user`: (`id`: String) User mentions "@someperson" | ||
* `channel`: (`id`: String) Channel mentions "#somechannel" | ||
* `emoji`: (`id`: String) Emoji mentions ":someemoji:". Expects a list of attributes for the `img` tag | ||
* `tex`: (`content`": String) TeX code. Expects a list of attributes for the `span` tag | ||
* `timestamp`: (`timestamp`: Number, `style`: String|undefined) Relative timestamp reference "<t:sometimestamp:somestyle>" | ||
@@ -44,0 +45,0 @@ * `spoilerAttrib`: object of HTML attributes for the spoiler span. Default is `{ class: 'd-spoiler' }` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
3278722
32
86473
69