mirror of
https://github.com/Orc/discount.git
synced 2026-09-25 04:10:00 +03:00
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:
@@ -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
|
||||
|
||||
@@ -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
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,6 +10,9 @@ char markdown_version[] = VERSION
|
||||
#if @TABSTOP@ != 4
|
||||
" TAB=@TABSTOP@"
|
||||
#endif
|
||||
#if SUPERSCRIPT
|
||||
" SUPERSCRIPT"
|
||||
#endif
|
||||
#if USE_AMALLOC
|
||||
" DEBUG"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user