WP Githuber MD代码显示问题

feko大魔王 咨询讨论 208

10002

10001

 

WP Githuber MD用了markdown编辑器,显示的代码内容带有以下内容:

<code class="language-shell">
</code><button class="copy-button">Copy</button>

请问怎么去掉他呢?

回复

共2条回复 我来回复
  • feko大魔王
    feko大魔王 评论

    临时解决方法:修改WP的代码  wp-includes/post-template.php 文件

    添加红框内容

    10000a110

    $content = str_replace( '<code>', '', $content );
    $content = str_replace( '<code class="language-shell">', '', $content );
    $content = str_replace( '<code class="language-python">', '', $content );

    注意:,java,c, cpp代码形式按图中以此类推添加

    来自:88运维https://www.88ops.com

    1年前 1条评论
    • 一为 1年前 评论

      应该是什么插件加了这些代码吧

  • ☾
    评论

    好像不起作用

    1年前 0条评论
One Nav 导航主题