Fossil SCM

Enable markdown by default. Render as markdown any document that ends with either "md" or "markdown".

drh 2013-03-29 15:43 trunk
Commit 02f312e698ee699cf66e8fc229d9aa1f866d2f78
+1 -3
--- auto.def
+++ auto.def
@@ -11,11 +11,10 @@
1111
internal-sqlite=1 => {Don't use the internal sqlite, use the system one}
1212
static=0 => {Link a static executable}
1313
lineedit=1 => {Disable line editing}
1414
fossil-debug=0 => {Build with fossil debugging enabled}
1515
json=0 => {Build with fossil JSON API enabled}
16
- markdown=0 => {Build with markdown engine enabled}
1716
}
1817
1918
# sqlite wants these types if possible
2019
cc-with {-includes {stdint.h inttypes.h}} {
2120
cc-check-types uint32_t uint16_t int16_t uint8_t
@@ -76,12 +75,11 @@
7675
define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
7776
define FOSSIL_ENABLE_JSON
7877
}
7978
8079
if {[opt-bool markdown]} {
81
- define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_MARKDOWN
82
- define FOSSIL_ENABLE_MARKDOWN
80
+ # no-op. Markdown is now enabled by default.
8381
}
8482
8583
if {[opt-bool static]} {
8684
# XXX: This will not work on all systems.
8785
define-append EXTRA_LDFLAGS -static
8886
--- auto.def
+++ auto.def
@@ -11,11 +11,10 @@
11 internal-sqlite=1 => {Don't use the internal sqlite, use the system one}
12 static=0 => {Link a static executable}
13 lineedit=1 => {Disable line editing}
14 fossil-debug=0 => {Build with fossil debugging enabled}
15 json=0 => {Build with fossil JSON API enabled}
16 markdown=0 => {Build with markdown engine enabled}
17 }
18
19 # sqlite wants these types if possible
20 cc-with {-includes {stdint.h inttypes.h}} {
21 cc-check-types uint32_t uint16_t int16_t uint8_t
@@ -76,12 +75,11 @@
76 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
77 define FOSSIL_ENABLE_JSON
78 }
79
80 if {[opt-bool markdown]} {
81 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_MARKDOWN
82 define FOSSIL_ENABLE_MARKDOWN
83 }
84
85 if {[opt-bool static]} {
86 # XXX: This will not work on all systems.
87 define-append EXTRA_LDFLAGS -static
88
--- auto.def
+++ auto.def
@@ -11,11 +11,10 @@
11 internal-sqlite=1 => {Don't use the internal sqlite, use the system one}
12 static=0 => {Link a static executable}
13 lineedit=1 => {Disable line editing}
14 fossil-debug=0 => {Build with fossil debugging enabled}
15 json=0 => {Build with fossil JSON API enabled}
 
16 }
17
18 # sqlite wants these types if possible
19 cc-with {-includes {stdint.h inttypes.h}} {
20 cc-check-types uint32_t uint16_t int16_t uint8_t
@@ -76,12 +75,11 @@
75 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
76 define FOSSIL_ENABLE_JSON
77 }
78
79 if {[opt-bool markdown]} {
80 # no-op. Markdown is now enabled by default.
 
81 }
82
83 if {[opt-bool static]} {
84 # XXX: This will not work on all systems.
85 define-append EXTRA_LDFLAGS -static
86
-3
--- src/db.c
+++ src/db.c
@@ -2104,13 +2104,10 @@
21042104
{ "https-login", 0, 0, 0, "off" },
21052105
{ "ignore-glob", 0, 40, 1, "" },
21062106
{ "localauth", 0, 0, 0, "off" },
21072107
{ "main-branch", 0, 40, 0, "trunk" },
21082108
{ "manifest", 0, 0, 1, "off" },
2109
-#ifdef FOSSIL_ENABLE_MARKDOWN
2110
- { "markdown", 0, 0, 0, "off" },
2111
-#endif
21122109
{ "max-upload", 0, 25, 0, "250000" },
21132110
{ "mtime-changes", 0, 0, 0, "on" },
21142111
{ "pgp-command", 0, 40, 0, "gpg --clearsign -o " },
21152112
{ "proxy", 0, 32, 0, "off" },
21162113
{ "relative-paths",0, 0, 0, "on" },
21172114
--- src/db.c
+++ src/db.c
@@ -2104,13 +2104,10 @@
2104 { "https-login", 0, 0, 0, "off" },
2105 { "ignore-glob", 0, 40, 1, "" },
2106 { "localauth", 0, 0, 0, "off" },
2107 { "main-branch", 0, 40, 0, "trunk" },
2108 { "manifest", 0, 0, 1, "off" },
2109 #ifdef FOSSIL_ENABLE_MARKDOWN
2110 { "markdown", 0, 0, 0, "off" },
2111 #endif
2112 { "max-upload", 0, 25, 0, "250000" },
2113 { "mtime-changes", 0, 0, 0, "on" },
2114 { "pgp-command", 0, 40, 0, "gpg --clearsign -o " },
2115 { "proxy", 0, 32, 0, "off" },
2116 { "relative-paths",0, 0, 0, "on" },
2117
--- src/db.c
+++ src/db.c
@@ -2104,13 +2104,10 @@
2104 { "https-login", 0, 0, 0, "off" },
2105 { "ignore-glob", 0, 40, 1, "" },
2106 { "localauth", 0, 0, 0, "off" },
2107 { "main-branch", 0, 40, 0, "trunk" },
2108 { "manifest", 0, 0, 1, "off" },
 
 
 
2109 { "max-upload", 0, 25, 0, "250000" },
2110 { "mtime-changes", 0, 0, 0, "on" },
2111 { "pgp-command", 0, 40, 0, "gpg --clearsign -o " },
2112 { "proxy", 0, 32, 0, "off" },
2113 { "relative-paths",0, 0, 0, "on" },
2114
+2 -4
--- src/doc.c
+++ src/doc.c
@@ -169,10 +169,11 @@
169169
{ "lzh", 3, "application/octet-stream" },
170170
{ "m", 1, "text/plain" },
171171
{ "m3u", 3, "audio/x-mpegurl" },
172172
{ "man", 3, "application/x-troff-man" },
173173
{ "markdown", 8, "text/x-markdown" },
174
+ { "md", 2, "text/x-markdown" },
174175
{ "me", 2, "application/x-troff-me" },
175176
{ "mesh", 4, "model/mesh" },
176177
{ "mid", 3, "audio/midi" },
177178
{ "midi", 4, "audio/midi" },
178179
{ "mif", 3, "application/x-mif" },
@@ -504,13 +505,11 @@
504505
}else{
505506
style_header("Documentation");
506507
wiki_convert(&filebody, 0, WIKI_BUTTONS);
507508
}
508509
style_footer();
509
-#ifdef FOSSIL_ENABLE_MARKDOWN
510
- }else if( fossil_strcmp(zMime, "text/x-markdown")==0
511
- && db_get_boolean("markdown", 0) ){
510
+ }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){
512511
Blob title = BLOB_INITIALIZER;
513512
Blob tail = BLOB_INITIALIZER;
514513
markdown_to_html(&filebody, &title, &tail);
515514
if( blob_size(&title)>0 ){
516515
style_header(blob_str(&title));
@@ -517,11 +516,10 @@
517516
}else{
518517
style_header("Documentation");
519518
}
520519
blob_append(cgi_output_blob(), blob_buffer(&tail), blob_size(&tail));
521520
style_footer();
522
-#endif
523521
}else if( fossil_strcmp(zMime, "text/plain")==0 ){
524522
style_header("Documentation");
525523
@ <blockquote><pre>
526524
@ %h(blob_str(&filebody))
527525
@ </pre></blockquote>
528526
--- src/doc.c
+++ src/doc.c
@@ -169,10 +169,11 @@
169 { "lzh", 3, "application/octet-stream" },
170 { "m", 1, "text/plain" },
171 { "m3u", 3, "audio/x-mpegurl" },
172 { "man", 3, "application/x-troff-man" },
173 { "markdown", 8, "text/x-markdown" },
 
174 { "me", 2, "application/x-troff-me" },
175 { "mesh", 4, "model/mesh" },
176 { "mid", 3, "audio/midi" },
177 { "midi", 4, "audio/midi" },
178 { "mif", 3, "application/x-mif" },
@@ -504,13 +505,11 @@
504 }else{
505 style_header("Documentation");
506 wiki_convert(&filebody, 0, WIKI_BUTTONS);
507 }
508 style_footer();
509 #ifdef FOSSIL_ENABLE_MARKDOWN
510 }else if( fossil_strcmp(zMime, "text/x-markdown")==0
511 && db_get_boolean("markdown", 0) ){
512 Blob title = BLOB_INITIALIZER;
513 Blob tail = BLOB_INITIALIZER;
514 markdown_to_html(&filebody, &title, &tail);
515 if( blob_size(&title)>0 ){
516 style_header(blob_str(&title));
@@ -517,11 +516,10 @@
517 }else{
518 style_header("Documentation");
519 }
520 blob_append(cgi_output_blob(), blob_buffer(&tail), blob_size(&tail));
521 style_footer();
522 #endif
523 }else if( fossil_strcmp(zMime, "text/plain")==0 ){
524 style_header("Documentation");
525 @ <blockquote><pre>
526 @ %h(blob_str(&filebody))
527 @ </pre></blockquote>
528
--- src/doc.c
+++ src/doc.c
@@ -169,10 +169,11 @@
169 { "lzh", 3, "application/octet-stream" },
170 { "m", 1, "text/plain" },
171 { "m3u", 3, "audio/x-mpegurl" },
172 { "man", 3, "application/x-troff-man" },
173 { "markdown", 8, "text/x-markdown" },
174 { "md", 2, "text/x-markdown" },
175 { "me", 2, "application/x-troff-me" },
176 { "mesh", 4, "model/mesh" },
177 { "mid", 3, "audio/midi" },
178 { "midi", 4, "audio/midi" },
179 { "mif", 3, "application/x-mif" },
@@ -504,13 +505,11 @@
505 }else{
506 style_header("Documentation");
507 wiki_convert(&filebody, 0, WIKI_BUTTONS);
508 }
509 style_footer();
510 }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){
 
 
511 Blob title = BLOB_INITIALIZER;
512 Blob tail = BLOB_INITIALIZER;
513 markdown_to_html(&filebody, &title, &tail);
514 if( blob_size(&title)>0 ){
515 style_header(blob_str(&title));
@@ -517,11 +516,10 @@
516 }else{
517 style_header("Documentation");
518 }
519 blob_append(cgi_output_blob(), blob_buffer(&tail), blob_size(&tail));
520 style_footer();
 
521 }else if( fossil_strcmp(zMime, "text/plain")==0 ){
522 style_header("Documentation");
523 @ <blockquote><pre>
524 @ %h(blob_str(&filebody))
525 @ </pre></blockquote>
526
-4
--- src/main.c
+++ src/main.c
@@ -780,14 +780,10 @@
780780
#endif
781781
#if defined(FOSSIL_ENABLE_JSON)
782782
++count;
783783
fossil_print("\tJSON (API %s)\n", FOSSIL_JSON_API_VERSION);
784784
#endif
785
-#if defined(FOSSIL_ENABLE_MARKDOWN)
786
- ++count;
787
- fossil_print("\tMARKDOWN\n");
788
-#endif
789785
if( !count ){
790786
fossil_print("\tNo optional features were enabled.\n");
791787
}
792788
}
793789
}
794790
--- src/main.c
+++ src/main.c
@@ -780,14 +780,10 @@
780 #endif
781 #if defined(FOSSIL_ENABLE_JSON)
782 ++count;
783 fossil_print("\tJSON (API %s)\n", FOSSIL_JSON_API_VERSION);
784 #endif
785 #if defined(FOSSIL_ENABLE_MARKDOWN)
786 ++count;
787 fossil_print("\tMARKDOWN\n");
788 #endif
789 if( !count ){
790 fossil_print("\tNo optional features were enabled.\n");
791 }
792 }
793 }
794
--- src/main.c
+++ src/main.c
@@ -780,14 +780,10 @@
780 #endif
781 #if defined(FOSSIL_ENABLE_JSON)
782 ++count;
783 fossil_print("\tJSON (API %s)\n", FOSSIL_JSON_API_VERSION);
784 #endif
 
 
 
 
785 if( !count ){
786 fossil_print("\tNo optional features were enabled.\n");
787 }
788 }
789 }
790
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -380,14 +380,10 @@
380380
381381
#### Enable JSON (http://www.json.org) support using "cson"
382382
#
383383
# FOSSIL_ENABLE_JSON = 1
384384
385
-#### Enable markdown support
386
-#
387
-# FOSSIL_ENABLE_MARKDOWN = 1
388
-
389385
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
390386
#
391387
# FOSSIL_ENABLE_SSL = 1
392388
393389
#### Enable scripting support via Tcl/Tk
@@ -525,16 +521,10 @@
525521
ifdef FOSSIL_ENABLE_JSON
526522
TCC += -DFOSSIL_ENABLE_JSON=1
527523
RCC += -DFOSSIL_ENABLE_JSON=1
528524
endif
529525
530
-# With markdown support
531
-ifdef FOSSIL_ENABLE_MARKDOWN
532
-TCC += -DFOSSIL_ENABLE_MARKDOWN=1
533
-RCC += -DFOSSIL_ENABLE_MARKDOWN=1
534
-endif
535
-
536526
#### We add the -static option here so that we can build a static
537527
# executable that will run in a chroot jail.
538528
#
539529
LIB = -static
540530
@@ -966,13 +956,10 @@
966956
ZLIB = zlib.lib
967957
968958
# Uncomment to enable JSON API
969959
# FOSSIL_ENABLE_JSON = 1
970960
971
-# Uncomment to enable markdown support
972
-# FOSSIL_ENABLE_MARKDOWN = 1
973
-
974961
INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)
975962
976963
CFLAGS = -nologo -MT -O2
977964
BCC = $(CC) $(CFLAGS)
978965
TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
@@ -982,15 +969,10 @@
982969
983970
!ifdef FOSSIL_ENABLE_JSON
984971
TCC = $(TCC) -DFOSSIL_ENABLE_JSON
985972
RCC = $(RCC) -DFOSSIL_ENABLE_JSON
986973
!endif
987
-
988
-!ifdef FOSSIL_ENABLE_MARKDOWN
989
-TCC = $(TCC) -DFOSSIL_ENABLE_MARKDOWN
990
-RCC = $(RCC) -DFOSSIL_ENABLE_MARKDOWN
991
-!endif
992974
}
993975
regsub -all {[-]D} $SQLITE_OPTIONS {/D} MSC_SQLITE_OPTIONS
994976
set j " \\\n "
995977
writeln "SQLITE_OPTIONS = [join $MSC_SQLITE_OPTIONS $j]\n"
996978
writeln -nonewline "SRC = "
997979
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -380,14 +380,10 @@
380
381 #### Enable JSON (http://www.json.org) support using "cson"
382 #
383 # FOSSIL_ENABLE_JSON = 1
384
385 #### Enable markdown support
386 #
387 # FOSSIL_ENABLE_MARKDOWN = 1
388
389 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
390 #
391 # FOSSIL_ENABLE_SSL = 1
392
393 #### Enable scripting support via Tcl/Tk
@@ -525,16 +521,10 @@
525 ifdef FOSSIL_ENABLE_JSON
526 TCC += -DFOSSIL_ENABLE_JSON=1
527 RCC += -DFOSSIL_ENABLE_JSON=1
528 endif
529
530 # With markdown support
531 ifdef FOSSIL_ENABLE_MARKDOWN
532 TCC += -DFOSSIL_ENABLE_MARKDOWN=1
533 RCC += -DFOSSIL_ENABLE_MARKDOWN=1
534 endif
535
536 #### We add the -static option here so that we can build a static
537 # executable that will run in a chroot jail.
538 #
539 LIB = -static
540
@@ -966,13 +956,10 @@
966 ZLIB = zlib.lib
967
968 # Uncomment to enable JSON API
969 # FOSSIL_ENABLE_JSON = 1
970
971 # Uncomment to enable markdown support
972 # FOSSIL_ENABLE_MARKDOWN = 1
973
974 INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)
975
976 CFLAGS = -nologo -MT -O2
977 BCC = $(CC) $(CFLAGS)
978 TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
@@ -982,15 +969,10 @@
982
983 !ifdef FOSSIL_ENABLE_JSON
984 TCC = $(TCC) -DFOSSIL_ENABLE_JSON
985 RCC = $(RCC) -DFOSSIL_ENABLE_JSON
986 !endif
987
988 !ifdef FOSSIL_ENABLE_MARKDOWN
989 TCC = $(TCC) -DFOSSIL_ENABLE_MARKDOWN
990 RCC = $(RCC) -DFOSSIL_ENABLE_MARKDOWN
991 !endif
992 }
993 regsub -all {[-]D} $SQLITE_OPTIONS {/D} MSC_SQLITE_OPTIONS
994 set j " \\\n "
995 writeln "SQLITE_OPTIONS = [join $MSC_SQLITE_OPTIONS $j]\n"
996 writeln -nonewline "SRC = "
997
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -380,14 +380,10 @@
380
381 #### Enable JSON (http://www.json.org) support using "cson"
382 #
383 # FOSSIL_ENABLE_JSON = 1
384
 
 
 
 
385 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
386 #
387 # FOSSIL_ENABLE_SSL = 1
388
389 #### Enable scripting support via Tcl/Tk
@@ -525,16 +521,10 @@
521 ifdef FOSSIL_ENABLE_JSON
522 TCC += -DFOSSIL_ENABLE_JSON=1
523 RCC += -DFOSSIL_ENABLE_JSON=1
524 endif
525
 
 
 
 
 
 
526 #### We add the -static option here so that we can build a static
527 # executable that will run in a chroot jail.
528 #
529 LIB = -static
530
@@ -966,13 +956,10 @@
956 ZLIB = zlib.lib
957
958 # Uncomment to enable JSON API
959 # FOSSIL_ENABLE_JSON = 1
960
 
 
 
961 INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)
962
963 CFLAGS = -nologo -MT -O2
964 BCC = $(CC) $(CFLAGS)
965 TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
@@ -982,15 +969,10 @@
969
970 !ifdef FOSSIL_ENABLE_JSON
971 TCC = $(TCC) -DFOSSIL_ENABLE_JSON
972 RCC = $(RCC) -DFOSSIL_ENABLE_JSON
973 !endif
 
 
 
 
 
974 }
975 regsub -all {[-]D} $SQLITE_OPTIONS {/D} MSC_SQLITE_OPTIONS
976 set j " \\\n "
977 writeln "SQLITE_OPTIONS = [join $MSC_SQLITE_OPTIONS $j]\n"
978 writeln -nonewline "SRC = "
979
--- src/markdown.c
+++ src/markdown.c
@@ -17,12 +17,10 @@
1717
**
1818
** This file contains code to parse a blob containing markdown text,
1919
** using an external renderer.
2020
*/
2121
22
-#ifdef FOSSIL_ENABLE_MARKDOWN
23
-
2422
#include "config.h"
2523
#include "markdown.h"
2624
2725
#include <assert.h>
2826
#include <string.h>
@@ -2238,7 +2236,5 @@
22382236
}
22392237
blob_zero(&rndr.refs);
22402238
blobarray_zero(rndr.work, rndr.make.max_work_stack);
22412239
fossil_free(rndr.work);
22422240
}
2243
-
2244
-#endif /* def FOSSIL_ENABLE_MARKDOWN */
22452241
--- src/markdown.c
+++ src/markdown.c
@@ -17,12 +17,10 @@
17 **
18 ** This file contains code to parse a blob containing markdown text,
19 ** using an external renderer.
20 */
21
22 #ifdef FOSSIL_ENABLE_MARKDOWN
23
24 #include "config.h"
25 #include "markdown.h"
26
27 #include <assert.h>
28 #include <string.h>
@@ -2238,7 +2236,5 @@
2238 }
2239 blob_zero(&rndr.refs);
2240 blobarray_zero(rndr.work, rndr.make.max_work_stack);
2241 fossil_free(rndr.work);
2242 }
2243
2244 #endif /* def FOSSIL_ENABLE_MARKDOWN */
2245
--- src/markdown.c
+++ src/markdown.c
@@ -17,12 +17,10 @@
17 **
18 ** This file contains code to parse a blob containing markdown text,
19 ** using an external renderer.
20 */
21
 
 
22 #include "config.h"
23 #include "markdown.h"
24
25 #include <assert.h>
26 #include <string.h>
@@ -2238,7 +2236,5 @@
2236 }
2237 blob_zero(&rndr.refs);
2238 blobarray_zero(rndr.work, rndr.make.max_work_stack);
2239 fossil_free(rndr.work);
2240 }
 
 
2241
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -17,12 +17,10 @@
1717
**
1818
** This file contains callbacks for the markdown parser that generate
1919
** XHTML output.
2020
*/
2121
22
-#ifdef FOSSIL_ENABLE_MARKDOWN
23
-
2422
#include "config.h"
2523
#include "markdown_html.h"
2624
2725
#if INTERFACE
2826
@@ -405,7 +403,5 @@
405403
};
406404
blob_reset(output_title);
407405
blob_reset(output_body);
408406
markdown(output_body, input_markdown, &html_renderer);
409407
}
410
-
411
-#endif /* def FOSSIL_ENABLE_MARKDOWN */
412408
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -17,12 +17,10 @@
17 **
18 ** This file contains callbacks for the markdown parser that generate
19 ** XHTML output.
20 */
21
22 #ifdef FOSSIL_ENABLE_MARKDOWN
23
24 #include "config.h"
25 #include "markdown_html.h"
26
27 #if INTERFACE
28
@@ -405,7 +403,5 @@
405 };
406 blob_reset(output_title);
407 blob_reset(output_body);
408 markdown(output_body, input_markdown, &html_renderer);
409 }
410
411 #endif /* def FOSSIL_ENABLE_MARKDOWN */
412
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -17,12 +17,10 @@
17 **
18 ** This file contains callbacks for the markdown parser that generate
19 ** XHTML output.
20 */
21
 
 
22 #include "config.h"
23 #include "markdown_html.h"
24
25 #if INTERFACE
26
@@ -405,7 +403,5 @@
403 };
404 blob_reset(output_title);
405 blob_reset(output_body);
406 markdown(output_body, input_markdown, &html_renderer);
407 }
 
 
408
--- src/th_main.c
+++ src/th_main.c
@@ -304,15 +304,13 @@
304304
#if defined(FOSSIL_ENABLE_JSON)
305305
else if( 0 == fossil_strnicmp( zArg, "json", 4 ) ){
306306
rc = 1;
307307
}
308308
#endif
309
-#if defined(FOSSIL_ENABLE_MARKDOWN)
310309
else if( 0 == fossil_strnicmp( zArg, "markdown", 8 ) ){
311310
rc = 1;
312311
}
313
-#endif
314312
if( g.thTrace ){
315313
Th_Trace("[hasfeature %#h] => %d<br />\n", argl[1], zArg, rc);
316314
}
317315
Th_SetResultInt(interp, rc);
318316
return TH_OK;
319317
320318
ADDED test/markdown-test1.md
--- src/th_main.c
+++ src/th_main.c
@@ -304,15 +304,13 @@
304 #if defined(FOSSIL_ENABLE_JSON)
305 else if( 0 == fossil_strnicmp( zArg, "json", 4 ) ){
306 rc = 1;
307 }
308 #endif
309 #if defined(FOSSIL_ENABLE_MARKDOWN)
310 else if( 0 == fossil_strnicmp( zArg, "markdown", 8 ) ){
311 rc = 1;
312 }
313 #endif
314 if( g.thTrace ){
315 Th_Trace("[hasfeature %#h] => %d<br />\n", argl[1], zArg, rc);
316 }
317 Th_SetResultInt(interp, rc);
318 return TH_OK;
319
320 DDED test/markdown-test1.md
--- src/th_main.c
+++ src/th_main.c
@@ -304,15 +304,13 @@
304 #if defined(FOSSIL_ENABLE_JSON)
305 else if( 0 == fossil_strnicmp( zArg, "json", 4 ) ){
306 rc = 1;
307 }
308 #endif
 
309 else if( 0 == fossil_strnicmp( zArg, "markdown", 8 ) ){
310 rc = 1;
311 }
 
312 if( g.thTrace ){
313 Th_Trace("[hasfeature %#h] => %d<br />\n", argl[1], zArg, rc);
314 }
315 Th_SetResultInt(interp, rc);
316 return TH_OK;
317
318 DDED test/markdown-test1.md
--- a/test/markdown-test1.md
+++ b/test/markdown-test1.md
@@ -0,0 +1,25 @@
1
+
2
+Markdown Formatter Test Document
3
+================================
4
+
5
+This document is designed to test the markdown formatter.
6
+
7
+ * A bullet item.
8
+ * A subitem
9
+ * Second bullet
10
+
11
+More text
12
+
13
+ 1. Enumeration
14
+ 1.1. Subitem 1
15
+ 1.2. Subitem 2
16
+ 2. Second enumeration.
17
+
18
+Another paragraph.
19
+
20
+
21
+
22
+Other Features
23
+--------------
24
+
25
+Text can show *emphasis* or _emphasis_ or **strong emphassis**.
--- a/test/markdown-test1.md
+++ b/test/markdown-test1.md
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/test/markdown-test1.md
+++ b/test/markdown-test1.md
@@ -0,0 +1,25 @@
1
2 Markdown Formatter Test Document
3 ================================
4
5 This document is designed to test the markdown formatter.
6
7 * A bullet item.
8 * A subitem
9 * Second bullet
10
11 More text
12
13 1. Enumeration
14 1.1. Subitem 1
15 1.2. Subitem 2
16 2. Second enumeration.
17
18 Another paragraph.
19
20
21
22 Other Features
23 --------------
24
25 Text can show *emphasis* or _emphasis_ or **strong emphassis**.
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -44,14 +44,10 @@
4444
4545
#### Enable JSON (http://www.json.org) support using "cson"
4646
#
4747
# FOSSIL_ENABLE_JSON = 1
4848
49
-#### Enable markdown support
50
-#
51
-# FOSSIL_ENABLE_MARKDOWN = 1
52
-
5349
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
5450
#
5551
# FOSSIL_ENABLE_SSL = 1
5652
5753
#### Enable scripting support via Tcl/Tk
@@ -189,16 +185,10 @@
189185
ifdef FOSSIL_ENABLE_JSON
190186
TCC += -DFOSSIL_ENABLE_JSON=1
191187
RCC += -DFOSSIL_ENABLE_JSON=1
192188
endif
193189
194
-# With markdown support
195
-ifdef FOSSIL_ENABLE_MARKDOWN
196
-TCC += -DFOSSIL_ENABLE_MARKDOWN=1
197
-RCC += -DFOSSIL_ENABLE_MARKDOWN=1
198
-endif
199
-
200190
#### We add the -static option here so that we can build a static
201191
# executable that will run in a chroot jail.
202192
#
203193
LIB = -static
204194
205195
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -44,14 +44,10 @@
44
45 #### Enable JSON (http://www.json.org) support using "cson"
46 #
47 # FOSSIL_ENABLE_JSON = 1
48
49 #### Enable markdown support
50 #
51 # FOSSIL_ENABLE_MARKDOWN = 1
52
53 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
54 #
55 # FOSSIL_ENABLE_SSL = 1
56
57 #### Enable scripting support via Tcl/Tk
@@ -189,16 +185,10 @@
189 ifdef FOSSIL_ENABLE_JSON
190 TCC += -DFOSSIL_ENABLE_JSON=1
191 RCC += -DFOSSIL_ENABLE_JSON=1
192 endif
193
194 # With markdown support
195 ifdef FOSSIL_ENABLE_MARKDOWN
196 TCC += -DFOSSIL_ENABLE_MARKDOWN=1
197 RCC += -DFOSSIL_ENABLE_MARKDOWN=1
198 endif
199
200 #### We add the -static option here so that we can build a static
201 # executable that will run in a chroot jail.
202 #
203 LIB = -static
204
205
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -44,14 +44,10 @@
44
45 #### Enable JSON (http://www.json.org) support using "cson"
46 #
47 # FOSSIL_ENABLE_JSON = 1
48
 
 
 
 
49 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
50 #
51 # FOSSIL_ENABLE_SSL = 1
52
53 #### Enable scripting support via Tcl/Tk
@@ -189,16 +185,10 @@
185 ifdef FOSSIL_ENABLE_JSON
186 TCC += -DFOSSIL_ENABLE_JSON=1
187 RCC += -DFOSSIL_ENABLE_JSON=1
188 endif
189
 
 
 
 
 
 
190 #### We add the -static option here so that we can build a static
191 # executable that will run in a chroot jail.
192 #
193 LIB = -static
194
195
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -26,13 +26,10 @@
2626
ZLIB = zlib.lib
2727
2828
# Uncomment to enable JSON API
2929
# FOSSIL_ENABLE_JSON = 1
3030
31
-# Uncomment to enable markdown support
32
-# FOSSIL_ENABLE_MARKDOWN = 1
33
-
3431
INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)
3532
3633
CFLAGS = -nologo -MT -O2
3734
BCC = $(CC) $(CFLAGS)
3835
TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
@@ -43,15 +40,10 @@
4340
!ifdef FOSSIL_ENABLE_JSON
4441
TCC = $(TCC) -DFOSSIL_ENABLE_JSON
4542
RCC = $(RCC) -DFOSSIL_ENABLE_JSON
4643
!endif
4744
48
-!ifdef FOSSIL_ENABLE_MARKDOWN
49
-TCC = $(TCC) -DFOSSIL_ENABLE_MARKDOWN
50
-RCC = $(RCC) -DFOSSIL_ENABLE_MARKDOWN
51
-!endif
52
-
5345
SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
5446
/DSQLITE_THREADSAFE=0 \
5547
/DSQLITE_DEFAULT_FILE_FORMAT=4 \
5648
/DSQLITE_ENABLE_STAT3 \
5749
/Dlocaltime=fossil_localtime \
5850
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -26,13 +26,10 @@
26 ZLIB = zlib.lib
27
28 # Uncomment to enable JSON API
29 # FOSSIL_ENABLE_JSON = 1
30
31 # Uncomment to enable markdown support
32 # FOSSIL_ENABLE_MARKDOWN = 1
33
34 INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)
35
36 CFLAGS = -nologo -MT -O2
37 BCC = $(CC) $(CFLAGS)
38 TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
@@ -43,15 +40,10 @@
43 !ifdef FOSSIL_ENABLE_JSON
44 TCC = $(TCC) -DFOSSIL_ENABLE_JSON
45 RCC = $(RCC) -DFOSSIL_ENABLE_JSON
46 !endif
47
48 !ifdef FOSSIL_ENABLE_MARKDOWN
49 TCC = $(TCC) -DFOSSIL_ENABLE_MARKDOWN
50 RCC = $(RCC) -DFOSSIL_ENABLE_MARKDOWN
51 !endif
52
53 SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
54 /DSQLITE_THREADSAFE=0 \
55 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
56 /DSQLITE_ENABLE_STAT3 \
57 /Dlocaltime=fossil_localtime \
58
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -26,13 +26,10 @@
26 ZLIB = zlib.lib
27
28 # Uncomment to enable JSON API
29 # FOSSIL_ENABLE_JSON = 1
30
 
 
 
31 INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)
32
33 CFLAGS = -nologo -MT -O2
34 BCC = $(CC) $(CFLAGS)
35 TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
@@ -43,15 +40,10 @@
40 !ifdef FOSSIL_ENABLE_JSON
41 TCC = $(TCC) -DFOSSIL_ENABLE_JSON
42 RCC = $(RCC) -DFOSSIL_ENABLE_JSON
43 !endif
44
 
 
 
 
 
45 SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
46 /DSQLITE_THREADSAFE=0 \
47 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
48 /DSQLITE_ENABLE_STAT3 \
49 /Dlocaltime=fossil_localtime \
50

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button