benoitbalon posteets tagged codepress  [ Profile ]

Sort by: Date / Title /

  1. 4 months ago
    Enregistrer ce code dans languages/diff.css du répertoire codepress (sans oublier le fichier Javascript décrit dans le 1er posteet !)
    1. /*
    2. * CodePress color styles for DIFF syntax highlighting
    3. */
    4.  
    5. separator
    6. {
    7. color: black;
    8. }
    9.  
    10. before
    11. {
    12. color: blue;
    13. font-size: 8pt;
    14. }
    15.  
    16. after
    17. {
    18. color: red;
    19. font-size: 8pt;
    20. }
    21.  
    22. lines
    23. {
    24. color: black;
    25. text-decoration: underline;
    26. font-weight: bold;
    27. font-size: 10pt;
    28. }
    29.  
    30. common
    31. {
    32. color: green;
    33. font-size: 10pt;
    34. }
    35.  
    36. onlyin
    37. {
    38. color: red;
    39. background-color: white;
    40. font-weight: bold;
    41. font-size: 10pt;
    42. }
    43.  
    44. diff
    45. {
    46. color: red;
    47. background-color: yellow;
    48. font-weight: bold;
    49. font-size: 10pt;
    50. }
  2. 4 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 (2 posteets)