Fork de wikipp, le moteur de wiki en c++, basé sur cppcms. Le fork ajoute la langue française
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

markdown.h 1.6KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef WIKIPP_MARKDOWN_H
  2. #define WIKIPP_MARKDOWN_H
  3. #include <string>
  4. namespace mkd {
  5. static const int no_links = 0x0001; // don't do link processing, block <a> tags
  6. static const int no_image = 0x0002; // don't do image processing, block <img>
  7. static const int no_pants = 0x0004; // don't run smartypants()
  8. static const int no_html = 0x0008; // don't allow raw html through at all
  9. static const int strict = 0x0010; // disable superscript, relaxed_emphasis
  10. static const int tagtext = 0x0020; // process text inside an html tag; no
  11. // <em>, no <bold>, no html or [] expansion
  12. static const int no_ext = 0x0040; // don't allow pseudo-protocols
  13. static const int cdata = 0x0080; // generate code for xml ![cdata[...]]
  14. static const int no_tables = 0x0400; // disallow tables
  15. static const int toc = 0x1000; // do table-of-contents processing
  16. static const int compat = 0x2000; // compatability with markdowntest_1.0
  17. static const int autolink = 0x4000; // make http://foo.com link even without <>s
  18. static const int safelink = 0x8000; // paranoid check for link protocol
  19. static const int embed = no_links|no_image|tagtext;
  20. static const int no_header = 0x0100; // don't process header blocks
  21. static const int tabstop = 0x0200; // expand tabs to 4 spaces
  22. };
  23. std::string markdown_to_html(char const *str,int len,int flags);
  24. std::string markdown_format_for_highlighting(std::string const &,std::string const &html_class);
  25. #endif