chore(Feedback): remove bug type

Nobody was using the type as intended, so this is part 1 of me phasing
it out.
This commit is contained in:
taskylizard 2025-03-11 23:38:38 +00:00
parent 59aa4be68c
commit e3685783c8
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
37 changed files with 2098 additions and 1991 deletions

View file

@ -30,7 +30,7 @@ export function base64DecodePlugin(md: MarkdownRenderer) {
md.renderer.rules.code_inline = function (tokens, idx, options, env, self) {
if (
!env.frontmatter.title ||
(env.frontmatter.title && !env.frontmatter.title === 'base64')
(env.frontmatter.title && env.frontmatter.title !== 'base64')
) {
return defaultRender(tokens, idx, options, env, self)
}

View file

@ -53,10 +53,10 @@ export const headersPlugin = (md: MarkdownRenderer) => {
return result
}
let defaultRender = md.renderer.rules.link_open;
let defaultRender = md.renderer.rules.link_open
md.renderer.rules.link_open = (tokens, idx, options, env, self) => {
const result = defaultRender(tokens, idx, options, env, self);
const result = defaultRender!!!!!!!!!!!(tokens, idx, options, env, self)
const meta = tokens[idx].meta
if (!meta || !meta.feedback) return result

View file

@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { MarkdownRenderer } from 'vitepress'
const excluded = ['Beginners Guide']
@ -25,12 +26,9 @@ export function toggleStarredPlugin(md: MarkdownRenderer) {
if (contentToken) {
const content = contentToken.content
// Log the content for debugging purposes
console.log('Content Token:', content)
if (
!excluded.includes(env.frontmatter.title) &&
(content.includes(':star:') || content.includes(':glowing-star:')) // Directly check for emojis
(content.includes(':star:') || content.includes(':glowing-star:'))
) {
return `<li class="starred">`
}