code_junkie

How would you go about auto-detecting Textile versus Markdown?

Nov 11th, 2011
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. h1. Header
  2.  
  3. p. Paragraph
  4.  
  5. if (preg_match('/^(p|h[1-6]). /m', $subject))
  6. {
  7. // Successful match
  8. } else
  9. {
  10. // Match attempt failed
  11. }
Add Comment
Please, Sign In to add comment