benoitbalon posteets tagged expressions regulieres,javascript  [ Profile ]

Sort by: Date / Title /

  1. 5 months ago
    Enregistrer ce code dans languages/diff.js du répertoire codepress, et ajouter "diff" à la liste des langages supportés dans le fichier codepress.js
    1. /*
    2. * CodePress regular expressions for DIFF syntax highlighting
    3. */
    4.  
    5. // DIFF
    6. Language.syntax = [
    7. { input : /([0-9,]*)(c|d|a)([0-9,]+)(<br|<\/P)/g,output : '<lines>$1$2$3</lines>$4' },
    8. { input : /(>)(\-{3})(<br|<\/P)/g,output : '$1<separator>$2</separator>$3'},
    9. { input : /(>)(&lt;.+?)(<br|<\/P)/g,output : '$1<before>$2</before>$3'},
    10. { input : /(>)(&gt;.+?)(<br|<\/P)/g,output : '$1<after>$2</after>$3' },
    11. { input : /(Common subdirectories.+?)(<br|<\/P)/g,output : '<common>$1</common>$2' },
    12. { input : /(Only in )(.+?)(: )(.+?)(<br|<\/P)/g,output : '<onlyin>$1$2$3$4</onlyin>$5' },
    13. { input : /(diff )(.+?)( )(.+?)(<br|<\/P)/g,output : '<diff>$1$2$3$4</diff>$5' }
    14. ]
    15.  
    16. Language.snippets = []
    17.  
    18. Language.complete = []
    19.  
    20. Language.shortcuts = []

First / Previous / Next / Last / Page 1 of 1 (1 posteets)