mirror of
https://github.com/fmhy/edit.git
synced 2026-02-19 09:41:17 +11:00
format
This commit is contained in:
parent
4ab375107c
commit
e6aa2f2f27
2 changed files with 3 additions and 3 deletions
|
|
@ -6,11 +6,11 @@ export function copyableCodePlugin(md: MarkdownRenderer) {
|
||||||
// Save the original rule for backticks
|
// Save the original rule for backticks
|
||||||
const defaultRender =
|
const defaultRender =
|
||||||
md.renderer.rules.code_inline ||
|
md.renderer.rules.code_inline ||
|
||||||
function(tokens, idx, options, env, self) {
|
function (tokens, idx, options, env, self) {
|
||||||
return self.renderToken(tokens, idx, options);
|
return self.renderToken(tokens, idx, options);
|
||||||
};
|
};
|
||||||
|
|
||||||
md.renderer.rules.code_inline = function(tokens, idx, options, env, self) {
|
md.renderer.rules.code_inline = function (tokens, idx, options, env, self) {
|
||||||
// @ts-expect-error shut the fuck up already I HATE THIS
|
// @ts-expect-error shut the fuck up already I HATE THIS
|
||||||
if (!env.frontmatter.title || (env.frontmatter.title && !env.frontmatter.title === "base64")) {
|
if (!env.frontmatter.title || (env.frontmatter.title && !env.frontmatter.title === "base64")) {
|
||||||
return defaultRender(tokens, idx, options, env, self);
|
return defaultRender(tokens, idx, options, env, self);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue