Commit Graph
34 Commits
Author SHA1 Message Date
david parsons 199213eb2e Modify theme so that I can pass in options (with -C & -c; -o is used) 2012-04-03 13:23:21 -07:00
david parsons 6eacbc931b I macro if(e) into if( (e) ) if gcc or clang are detected 2012-01-24 09:53:51 -08:00
david parsons 094b09800e 1. In configure.inc, check for (and comment disapprovingly) if someone is inflicting clang on discount.
2. strip types off `main()`s so that stupid clang won't die.
2011-10-06 23:26:33 -07:00
david parsons d4ea79f47a Add a -E flag to theme to allow <?theme expansions
everywhere (except in html comments) instead of being
context-sensitive
2011-07-13 10:56:24 -07:00
david parsons 3b24127f58 Add <?theme config?>, which writes a listing of all of the runtime
settings to the output file.
2010-11-10 23:22:23 -08:00
David Parsons ecf0b01d3f When figuring where to put the .html for an output file, take into
account the teeny detail that the source filename might not have an
extension to strip off.
2010-06-16 18:14:33 -07:00
david parsons f078ee6069 Tweak the fdate() function so that it takes the document date,
and if that doesn't exist and there's a file date, that one.
2009-11-28 22:07:40 -08:00
David Parsons 94c0e700b4 1. Add a new flag (MKD_NOTABLES) to turn off the table extension.
2. Theme is /still/ broken for generating output files -- try to fix again.
3. Add more table test cases.
2009-08-02 10:32:02 -07:00
David Parsons 8ca7a50e70 mkd_text() is now mkd_generateline(); the new
function `mkd_line()` formats a line into a string,
similarly to `mkd_toc()`, `mkd_xml()`, and so on.

There are a whole bunch of new public functions now,
so I'm pushing the version up to 1.4.0
2009-05-12 10:49:51 -07:00
David Parsons 93560cbefb In theme.c and xmlpage.c, use mkd_generatecss() instead
of the unfortunately named `mkd_style()` to print out the
stylesheets.
2009-05-12 07:00:23 -07:00
David Parsons 2dcf207a49 1. Rework the way I process html blocks; now I walk through and look at
tokens instead of just matching the beginning of the line.  This will
   hopefully make it handle user html in a more graceful manner.
2. Fix theme so it won't dump the generated html into the parent directory
   when I give it a directory name to themify.
2009-04-27 17:21:06 -07:00
David Parsons a59e83ec29 Add support for table-of-contents generation (code supplied by Jjgod Jiang)
and a function that generates a rudimentary xhmtl page from a markdown
document (idea from Tim Channon)
2008-09-26 11:39:32 -07:00
david parsons 89b513d761 If theme is given a directory argument, attempt to open the
file ``index'' in that directory.
2008-09-02 22:09:58 -07:00
david parsons 713dc135c4 Correct a misspelling of ``template'' 2008-04-14 01:46:41 -07:00
david parsons 5c6115c601 1. Add the new amalloc module, which (if enabled with
--enable-amalloc) replaced malloc and its ilk with
    versions that attempt to maintain a linked list of
    allocated blocks that can be printed to stderr with
    the `adump()` function.

2.  Clean up a couple more places where I leak memory
    during the first level parse.

3.  tweak cstring.h to try to chase down places where
    the C compiler might optimize EXPAND() into producing
    broken code.
2008-04-03 11:22:07 -07:00
david parsons 41c153a48a Replace all alloca()s with malloc() 2008-03-13 16:49:46 -07:00
david parsons ee8b9dd2a9 1. Change emphasis to make it less greedy; *** was <strong><em>, is now
`<em><strong>` (prepwork for properly blocking emphasis blocks)
2. In the `fchdir()` version of `popd()`, don't forget to define
   `rc` before I use it.
2008-03-03 22:44:54 -08:00
David Parsons aee5f3bff0 More MS-DOS compatability; fchdir() is not defined in all versions
of mingw/msys, so fake it there with getcwd() and chdir().
2008-03-03 22:33:25 -08:00
david parsons 88a3fe3447 Tweak the logic where I attempt to get the document author 2008-02-28 00:21:59 -08:00
david parsons ba86426101 Check for the existance of pwd.h and getpwuid() before doing fancy
"get password information for author and root" gymnastics.
2008-02-25 10:32:05 -08:00
david parsons dd79f848b7 1. version[] -> markdown_version[]
2. clean up \-escapes so that only special characters will be escaped.
 3. Use the entity &#0; as a token break.
 4. check for the existance of goddamn gcc
2008-02-18 10:09:23 -08:00
david parsons 8a80038fad Write a manpage for theme(1) 2008-01-23 17:20:45 -08:00
david parsons 52bc316ff9 1. in mkdio.h, tweak the MMIOT abstract type from `void\*'' to `void''.
2. in `theme.c` ...
    1. use a keyword table instead of an inline islike() cascade.
    2. make `?theme source?` print the **basename** of the pagename, and
    3. add the new `?theme path?` to print the dirname of the pagename
3. when configuring, check for a sane (reentrant) `basename()` function.
4. when giving the package version#, say `discount` instead of `markdown`
2008-01-23 11:43:54 -08:00
david parsons d5266835af Forgot a comment in the xref section of mkd-functions.3
Add the -V option to theme
2008-01-19 00:29:16 -08:00
david parsons 186eb7ca5a The smartypants code was checking smarties _after_ doing quote
substitution.  This messed up 's and 't.
Also make <?theme include(x)?> actually work.
2008-01-18 15:31:42 -08:00
david parsons fa43fd7e27 Support <?theme include(file)?> 2008-01-18 14:04:20 -08:00
david parsons da30b6224f Check more carefully about inside tag/outside tag changes; if we're inside
tag text, emphasis and linkylinky isn't anymore.
2008-01-18 11:18:00 -08:00
david parsons 0cdbbea9f9 Add support for <style> and <script> html blocks.
`<script>` blocks are added by the simple expedient of adding "`SCRIPT`" to
the blocktags[] table, but `<style>` blocks need to be written into the
document `<head>`, so they have to be stored as a different type and
output with the new function `mkd_style()` and **not** by `mkd_generatehtml()`
2008-01-17 12:38:40 -08:00
david parsons 37044fd38d In linkytitle(), a ) shouldn't drop out of the title string unless at
least two quotes have been seen.
2008-01-16 16:56:58 -08:00
david parsons 841101bbc6 theme pulls document author and date from the document status,
if at all possible.   Also put in a new flag `-f`, which forces
a write to the file by the simple expedient of removing the
old one before running.
2008-01-15 13:48:04 -08:00
david parsons d46b726bb3 1. Add the new flag MKD_BROKET, which tells markdown to expand all text <>s.
2. define the flag `MKD_EMBED`, which turns on `<>` and `"`expansion.
3. modify `theme` so it keeps track of whether it's inside html tags and
   whether it's in the header or body of a page.
2008-01-15 08:40:43 -08:00
david parsons 8a2ef658d5 Tweaks to the output of <?theme author?> and <?theme version?> 2008-01-15 01:06:18 -08:00
david parsons 0f969b25b8 Update the makefile so it builds theme.
Add <?theme version?>
2008-01-15 01:01:47 -08:00
david parsons 65cfdff3e8 Add a markdown'ed version of theme (totally new code with many less
features!)
2008-01-15 00:59:40 -08:00