Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

183
Visualizações
Disabling "italic" and "bold" features doesn't work in marked.js

I'm using marked.js to convert my text to html. I have the following code to disable bunch of commands, including header (# text), list/listItem and etc. but it doesn't disable "italic" and "bold". Anyone here knows how to get that to work. Thank you

const getUnfilteredContent = (content) => {
    const lexer = new marked.Lexer({});
    var list = [
      'em',
      'emStrong',
      'code',
      'def',
      'lheading',
      'fences',
      'blockquote',
      'html',
      'heading',
      'hr',
      'list',
      'listitem',
      'paragraph',
      'table',
      'tablerow',
      'tablecell',
      'strong',
      'codespan',
      'br',
      'del',
      'link',
      'image',
    ];

    for (let i in list) {
      const key = list[i];
      lexer.tokenizer.rules.block[key] = { exec: function () { } }
    }
    return lexer.lex(content);
  }
marked.parser(getUnfilteredContent(value), {})
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda