Sha256: 74044a26a91999ee7c26e687414552cba0c3c61205b102865f3e3ba65915a601

Contents?: true

Size: 851 Bytes

Versions: 95

Compression:

Stored size: 851 Bytes

Contents

/*
 * docheader -- get values from the document header
 *
 * Copyright (C) 2007 David L Parsons.
 * The redistribution terms are provided in the COPYRIGHT file that must
 * be distributed with this source code.
 */
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

#include "cstring.h"
#include "markdown.h"
#include "amalloc.h"

#define afterdle(t)	(T((t)->text) + (t)->dle)

char *
mkd_doc_title(Document *doc)
{
    if ( doc && doc->headers )
	return afterdle(doc->headers);
    return 0;
}


char *
mkd_doc_author(Document *doc)
{
    if ( doc && doc->headers && doc->headers->next )
	return afterdle(doc->headers->next);
    return 0;
}


char *
mkd_doc_date(Document *doc)
{
    if ( doc && doc->headers && doc->headers->next && doc->headers->next->next )
	return afterdle(doc->headers->next->next);
    return 0;
}

Version data entries

95 entries across 92 versions & 12 rubygems

Version Path
challah-0.3.4 vendor/bundle/gems/rdiscount-1.6.8/ext/docheader.c
challah-0.3.3 vendor/bundle/gems/rdiscount-1.6.8/ext/docheader.c
challah-0.3.2 vendor/bundle/gems/rdiscount-1.6.8/ext/docheader.c
challah-0.3.1 vendor/bundle/gems/rdiscount-1.6.8/ext/docheader.c
challah-0.3.0 vendor/bundle/gems/rdiscount-1.6.8/ext/docheader.c
challah-0.2.1 vendor/bundle/gems/rdiscount-1.6.8/ext/docheader.c
challah-0.2.0 vendor/bundle/gems/rdiscount-1.6.8/ext/docheader.c
rdiscount-1.6.8 ext/docheader.c
bluecloth-2.0.9 ext/docheader.c
rdiscount-1.6.5 ext/docheader.c
rdiscount-1.6.3.2 ext/docheader.c
moredown-1.3.0 ext/docheader.c
rdiscount-1.6.3.1 ext/docheader.c
rdiscount-1.6.3 ext/docheader.c
rdiscount-1.5.8.1 ext/docheader.c
rdiscount-1.5.8 ext/docheader.c
bluecloth-2.0.7 ext/docheader.c
bluecloth-2.0.7-x86-mswin32 ext/docheader.c
bluecloth-2.0.7-x86-mingw32 ext/docheader.c
bluecloth-2.0.7.pre126 ext/docheader.c