1. Enable --with-superscript

2. Write a superscript test case
3. Up to version 1.2.7
4. have the version string include whether superscripts are enabled
This commit is contained in:
David Parsons
2008-07-30 22:08:46 -07:00
parent 15d07b094c
commit e1f898adb3
6 changed files with 20 additions and 2 deletions
+1
View File
@@ -29,6 +29,7 @@ Configure.sh has a few options that can be set:
--enable-dl-tag Use the DL tag extension
--enable-pandoc-header Use pandoc-style header blocks
--with-tabstops=N Set tabstops to N characters (default is 4)
--with-superscript A^B expands to A<sup>B</sup>
--enable-amalloc Use a debugging memory allocator (to detect leaks)
3) Installing sample programs and manpages
+1 -1
View File
@@ -1 +1 @@
1.2.6
1.2.7
+4
View File
@@ -10,6 +10,7 @@
ac_help='--enable-dl-tag Use the DL tag extension
--enable-pandoc-header Use pandoc-style header blocks
--with-tabstops=N Set tabstops to N characters (default is 4)
--with-superscript A^B becomes A<sup>B</sup>
--enable-amalloc Enable memory allocation debugging'
LOCAL_AC_OPTIONS='
@@ -100,6 +101,9 @@ fi
AC_DEFINE 'TABSTOP' $TABSTOP
AC_SUB 'TABSTOP' $TABSTOP
test -z "$WITH_SUPERSCRIPT" || AC_DEFINE 'SUPERSCRIPT' 1
if [ "$WITH_AMALLOC" ]; then
AC_DEFINE 'USE_AMALLOC' 1
+1 -1
View File
@@ -925,7 +925,7 @@ text(MMIOT *f)
case '[': if ( tag_text(f) || !linkylinky(0, f) )
Qchar(c, f);
break;
#if WITH_SUPERSCRIPT
#if SUPERSCRIPT
case '^': if ( isthisspace(f,-1) || isthisspace(f,1) )
Qchar(c,f);
else {
+10
View File
@@ -113,4 +113,14 @@ else
rc=1
fi
if ./markdown -V | grep SUPERSCRIPT >/dev/null; then
./echo -n " A^B -> A<sup>B</sup> ............. "
if ./echo "A^B" | ./markdown | grep '<sup>B</sup>' >/dev/null; then
./echo "ok"
else
./echo "FAILED"
rc=1
fi
fi
exit $rc
+3
View File
@@ -10,6 +10,9 @@ char markdown_version[] = VERSION
#if @TABSTOP@ != 4
" TAB=@TABSTOP@"
#endif
#if SUPERSCRIPT
" SUPERSCRIPT"
#endif
#if USE_AMALLOC
" DEBUG"
#endif