Guest User

Untitled

a guest
Feb 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. bold = {
  2. name = 'markup.bold.markdown';
  3. begin = '(\*\*|__)(?=\S)(?=(.+?[*_]*)(?<![^\\]\\|[^\\]\\\\\\|[^\\]\\\\\\\\\\)(?<=\S)\1)';
  4. end = '(?<=\S)\1';
  5. patterns = (
  6. { begin = '(?=<[^>]*?>)';
  7. end = '';
  8. applyEndPatternLast = '1';
  9. patterns = (
  10. { include = 'text.html.basic'; },
  11. );
  12. },
  13. { name = 'markup.italic.markdown';
  14. comment = 'Match simple italics for speed';
  15. match = '(\*|_)(?=\S)[a-zA-Z0-9-. ]+?(?<=\S)\1';
  16. },
  17. { include = '#escape'; },
  18. { include = '#ampersand'; },
  19. { include = '#raw'; },
  20. { include = '#italic'; },
  21. { include = '#line-break'; },
  22. { include = '#image-inline'; },
  23. { include = '#link-inline'; },
  24. { include = '#link-inet'; },
  25. { include = '#link-email'; },
  26. { include = '#image-ref'; },
  27. { include = '#link-ref-literal'; },
  28. { include = '#link-ref'; },
  29. );
  30. };
  31. italic = {
  32. name = 'markup.italic.markdown';
  33. begin = '(\*|_)(?=\S)(?=(.+?[*_]*)(?<![^\\]\\|[^\\]\\\\\\|[^\\]\\\\\\\\\\)(?<=\S)\1)';
  34. end = '(?<=\S)\1';
  35. patterns = (
  36. { begin = '(?=<[^>]*?>)';
  37. end = '';
  38. applyEndPatternLast = '1';
  39. patterns = (
  40. { include = 'text.html.basic'; },
  41. );
  42. },
  43. { name = 'markup.bold.markdown';
  44. comment = 'Match simple bolds for speed';
  45. match = '(\*\*|__)(?=\S)[a-zA-Z0-9-. ]+?(?<=\S)\1';
  46. },
  47. { include = '#escape'; },
  48. { include = '#ampersand'; },
  49. { include = '#raw'; },
  50. { include = '#bold'; },
  51. { include = '#line-break'; },
  52. { include = '#image-inline'; },
  53. { include = '#link-inline'; },
  54. { include = '#link-inet'; },
  55. { include = '#link-email'; },
  56. { include = '#image-ref'; },
  57. { include = '#link-ref-literal'; },
  58. { include = '#link-ref'; },
  59. );
  60. };
Add Comment
Please, Sign In to add comment