Loading client/src/components/Common/GCard.vue +1 −7 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ async function toggleBookmark() { bookmarkLoading.value = false; } const { renderMarkdown } = useMarkdown({ openLinksInNewPage: true }); const { renderMarkdown } = useMarkdown({ noMargin: true, openLinksInNewPage: true }); /** * Helper functions for generating consistent element IDs Loading Loading @@ -747,12 +747,6 @@ function onKeyDown(event: KeyboardEvent) { text-overflow: unset; } .g-card-description { :deep(p) { margin-bottom: 0; } } .g-card-secondary-action-label { @container g-card (max-width: #{$breakpoint-sm}) { display: none; Loading client/src/composables/markdown.ts +15 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,16 @@ function addRuleHeadingIncreaseLevel(engine: MarkdownIt, increaseBy: number) { }; } function addRuleNoMargin(engine: MarkdownIt) { engine.renderer.rules.paragraph_open = function (tokens, idx, options, env, self) { const token = tokens[idx]; if (token) { token.attrPush(["style", "margin:0"]); } return self.renderToken(tokens, idx, options); }; } /** * Add a rule that removes newlines after list items. */ Loading Loading @@ -138,6 +148,7 @@ interface UseMarkdownOptions { openLinksInNewPage?: boolean; increaseHeadingLevelBy?: number; removeNewlinesAfterList?: boolean; noMargin?: boolean; } type RawMarkdown = string; Loading @@ -155,6 +166,10 @@ export function useMarkdown(options: UseMarkdownOptions = {}) { addRuleHeadingIncreaseLevel(mdEngine, options.increaseHeadingLevelBy); } if (options.noMargin) { addRuleNoMargin(mdEngine); } if (options.removeNewlinesAfterList) { addRuleRemoveNewlinesAfterList(mdEngine); } Loading Loading
client/src/components/Common/GCard.vue +1 −7 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ async function toggleBookmark() { bookmarkLoading.value = false; } const { renderMarkdown } = useMarkdown({ openLinksInNewPage: true }); const { renderMarkdown } = useMarkdown({ noMargin: true, openLinksInNewPage: true }); /** * Helper functions for generating consistent element IDs Loading Loading @@ -747,12 +747,6 @@ function onKeyDown(event: KeyboardEvent) { text-overflow: unset; } .g-card-description { :deep(p) { margin-bottom: 0; } } .g-card-secondary-action-label { @container g-card (max-width: #{$breakpoint-sm}) { display: none; Loading
client/src/composables/markdown.ts +15 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,16 @@ function addRuleHeadingIncreaseLevel(engine: MarkdownIt, increaseBy: number) { }; } function addRuleNoMargin(engine: MarkdownIt) { engine.renderer.rules.paragraph_open = function (tokens, idx, options, env, self) { const token = tokens[idx]; if (token) { token.attrPush(["style", "margin:0"]); } return self.renderToken(tokens, idx, options); }; } /** * Add a rule that removes newlines after list items. */ Loading Loading @@ -138,6 +148,7 @@ interface UseMarkdownOptions { openLinksInNewPage?: boolean; increaseHeadingLevelBy?: number; removeNewlinesAfterList?: boolean; noMargin?: boolean; } type RawMarkdown = string; Loading @@ -155,6 +166,10 @@ export function useMarkdown(options: UseMarkdownOptions = {}) { addRuleHeadingIncreaseLevel(mdEngine, options.increaseHeadingLevelBy); } if (options.noMargin) { addRuleNoMargin(mdEngine); } if (options.removeNewlinesAfterList) { addRuleRemoveNewlinesAfterList(mdEngine); } Loading