Guest User

Untitled

a guest
Feb 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. bold = {
  2. name = 'markup.bold.markdown';
  3. begin = '(?x)
  4. (\*\*|__)(?=\S) # Open
  5. (?=
  6. (
  7. [^\<`] # Ignore html tags and
  8. # raw states.
  9. | <[^>]*?> # HTML tags
  10. | <(?=[^>]*$) # Open bracket otherwise
  11. | ``.*?`` # Raw v1
  12. | `([^\\`]|\\.)*?` # Raw v2
  13. | \\` # Escaped backtick
  14. )*?
  15. (?<!
  16. [^\\]\\ # Crazy check for
  17. | [^\\]\\\\\\ # escapes before the
  18. | [^\\]\\\\\\\\\\ # end condition.
  19. )
  20. (?<=\S)\1 # Close
  21. )
  22. ';
  23. end = '(?<=\S)\1';
  24. patterns = (
  25. { begin = '(?=<[^>]*?>)';
  26. end = '(?<=>)';
  27. patterns = (
  28. { include = 'text.html.basic'; },
  29. );
  30. },
  31. { name = 'markup.italic.markdown';
  32. comment = 'Match simple italics for speed';
  33. match = '(\*|_)(?=\S)[a-zA-Z0-9-. ]+?(?<=\S)\1';
  34. },
  35. { include = '#escape'; },
  36. { include = '#ampersand'; },
  37. { include = '#raw'; },
  38. { include = '#italic'; },
  39. { include = '#image-inline'; },
  40. { include = '#link-inline'; },
  41. { include = '#link-inet'; },
  42. { include = '#link-email'; },
  43. { include = '#image-ref'; },
  44. { include = '#link-ref-literal'; },
  45. { include = '#link-ref'; },
  46. );
  47. };
Add Comment
Please, Sign In to add comment