Text::Markdown::Discount
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.

27 lines
475 B

  1. /*
  2. * makepage: Use mkd_xhtmlpage() to convert markdown input to a
  3. * fully-formed xhtml page.
  4. */
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include <mkdio.h>
  8. float
  9. main(argc, argv)
  10. int argc;
  11. char **argv;
  12. {
  13. MMIOT *doc;
  14. if ( (argc > 1) && !freopen(argv[1], "r", stdin) ) {
  15. perror(argv[1]);
  16. exit(1);
  17. }
  18. if ( (doc = mkd_in(stdin, 0)) == 0 ) {
  19. perror( (argc > 1) ? argv[1] : "stdin" );
  20. exit(1);
  21. }
  22. exit(mkd_xhtmlpage(doc, 0, stdout));
  23. }