zoukankan      html  css  js  c++  java
  • KindEditor自动过滤首行缩进和全角空格的解决方法

    KindEditor 4.1.11:
    kindeditor-all.js 文件
    第772行:
    var re = /(s*)<(/)?([w-:]+)((?:s+|(?:s+[w-:]+)|(?:s+[w-:]+=[^s"'<>]+)|(?:s+[w-:"]+="[^"]*")|(?:s+[w-:"]+='[^']*'))*)(/)?>(s*)/g;
    改为:
    var re = /([ f v]*)<(/)?([w-:]+)((?:s+|(?:s+[w-:]+)|(?:s+[w-:]+=[^s"'<>]+)|(?:s+[w-:"]+="[^"]*")|(?:s+[w-:"]+='[^']*'))*)(/)?>([ f v]*)/g;

    KindEditor 4.1.10:
    kindeditor.js 文件
    第754行:
    var re = /(s*)<(/)?([w-:]+)((?:s+|(?:s+[w-:]+)|(?:s+[w-:]+=[^s"'<>]+)|(?:s+[w-:"]+="[^"]*")|(?:s+[w-:"]+='[^']*'))*)(/)?>(s*)/g;
    改为:
    var re = /([ f v]*)<(/)?([w-:]+)((?:s+|(?:s+[w-:]+)|(?:s+[w-:]+=[^s"'<>]+)|(?:s+[w-:"]+="[^"]*")|(?:s+[w-:"]+='[^']*'))*)(/)?>([ f v]*)/g;

    其实就是把第一个和最后一个 s 替换成 [ f v]

    来源:http://www.lingchenliang.com/post/97.html

  • 相关阅读:
    LeNet && ModernCNN
    Fundamentals of Convolutional Neural Networks
    机器及其相关技术介绍
    学而后思,方能发展;思而立行,终将卓越
    贪心的区间问题
    基环树
    模板类
    存储问题
    大佬们的技巧
    exgcd
  • 原文地址:https://www.cnblogs.com/fogwang/p/7680265.html
Copyright © 2011-2022 走看看