Fossil

Changes On Branch markdownDivWrapper
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch markdownDivWrapper Excluding Merge-Ins

This is equivalent to a diff from b2a4b66f4b to 8478033670

2014-09-26
21:02
Wrap markdown content in an HTML 'div' block of the 'markdown' class. check-in: e061a675e6 user: mistachkin tags: trunk
2014-09-23
12:15
Add support for Docker [http://www.docker.com/] check-in: 7aced53023 user: jan.nijtmans tags: trunk
00:56
Merge updates from trunk. check-in: 44ded27f7c user: mistachkin tags: winsymlink
2014-09-22
19:56
Wrap markdown content in an HTML 'div' block of the 'markdown' class. Closed-Leaf check-in: 8478033670 user: mistachkin tags: markdownDivWrapper
2014-09-21
20:13
(experimental) Dockerfile. Allows to create a fossil docker image. An already built fossil docker images can be started by: "sudo docker run -d -p 8080:8080 nijtmans/fossil" (assuming you already installed docker). Open "localhost:8080" in your browser, and log in with "admin"/"admin". Change your admin password and configure it at wish. check-in: a7fc0c5f6e user: jan.nijtmans tags: docker
19:40
typos check-in: b2a4b66f4b user: jan.nijtmans tags: trunk
2014-09-20
15:07
minor reformulation of the makeheaders.c string.h patch. check-in: 51937b7282 user: stephan tags: trunk

Changes to src/markdown_html.c.

80
81
82
83
84
85
86










87
88
89
90
91
92
93
      i++;
    }
  }
}


/* HTML block tags */











static void html_raw_block(struct Blob *ob, struct Blob *text, void *opaque){
  char *data = blob_buffer(text);
  size_t first = 0, size = blob_size(text);
  INTER_BLOCK(ob);
  while( first<size && data[first]=='\n' ) first++;
  while( size>first && data[size-1]=='\n' ) size--;







>
>
>
>
>
>
>
>
>
>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
      i++;
    }
  }
}


/* HTML block tags */

static void html_prolog(struct Blob *ob, void *opaque){
  INTER_BLOCK(ob);
  BLOB_APPEND_LITTERAL(ob, "<div class=\"markdown\">\n");
}

static void html_epilog(struct Blob *ob, void *opaque){
  INTER_BLOCK(ob);
  BLOB_APPEND_LITTERAL(ob, "</div>\n");
}

static void html_raw_block(struct Blob *ob, struct Blob *text, void *opaque){
  char *data = blob_buffer(text);
  size_t first = 0, size = blob_size(text);
  INTER_BLOCK(ob);
  while( first<size && data[first]=='\n' ) first++;
  while( size>first && data[size-1]=='\n' ) size--;
362
363
364
365
366
367
368
369


370
371
372
373
374
375
376

void markdown_to_html(
  struct Blob *input_markdown,
  struct Blob *output_title,
  struct Blob *output_body
){
  struct mkd_renderer html_renderer = {
    0, 0,  /* no prolog or epilog */



    /* block level elements */
    html_blockcode,
    html_blockquote,
    html_raw_block,
    html_header,
    html_hrule,







|
>
>







372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388

void markdown_to_html(
  struct Blob *input_markdown,
  struct Blob *output_title,
  struct Blob *output_body
){
  struct mkd_renderer html_renderer = {
    /* prolog and epilog */
    html_prolog,
    html_epilog,

    /* block level elements */
    html_blockcode,
    html_blockquote,
    html_raw_block,
    html_header,
    html_hrule,