diff --git a/Makefile.in b/Makefile.in
index 3bda63d..0694263 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,9 +31,11 @@ install: $(PGMS) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCDIR)
install.everything: install install.samples install.man
install.samples: $(SAMPLE_PGMS) install $(DESTDIR)$(BINDIR)
- @INSTALL_PROGRAM@ $(SAMPLE_PGMS) $(DESTDIR)$(BINDIR)
@INSTALL_DIR@ $(DESTDIR)$(MANDIR)/man1
- @INSTALL_DATA@ theme.1 makepage.1 mkd2html.1 $(DESTDIR)$(MANDIR)/man1
+ for x in $(SAMPLE_PGMS); do \
+ @INSTALL_PROGRAM@ $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \
+ @INSTALL_DATA@ $$x.1 $(DESTDIR)$(MANDIR)/man1/$(SAMPLE_PFX)$$x; \
+ done
install.man:
@INSTALL_DIR@ $(DESTDIR)$(MANDIR)/man3
diff --git a/configure.sh b/configure.sh
index 44c8986..166665a 100755
--- a/configure.sh
+++ b/configure.sh
@@ -13,6 +13,7 @@ ac_help='--enable-amalloc Enable memory allocation debugging
--with-id-anchor Use id= anchors for table-of-contents links
--with-github-tags Allow `_` and `-` in <> tags
--with-fenced-code Allow fenced code blocks
+--with-urlencoded-anchor Use url-encoded chars to multibyte chars in toc links
--enable-all-features Turn on all stable optional features
--shared Build shared libraries (default is static)'
@@ -57,6 +58,7 @@ esac
test "$WITH_FENCED_CODE" && AC_DEFINE "WITH_FENCED_CODE" 1
test "$WITH_ID_ANCHOR" && AC_DEFINE 'WITH_ID_ANCHOR' 1
test "$WITH_GITHUB_TAGS" && AC_DEFINE 'WITH_GITHUB_TAGS' 1
+test "$WITH_URLENCODED_ANCHOR" && AC_DEFINE 'WITH_URLENCODED_ANCHOR' 1
AC_PROG_CC
diff --git a/markdown.c b/markdown.c
index 207700c..74870eb 100644
--- a/markdown.c
+++ b/markdown.c
@@ -1018,6 +1018,7 @@ addfootnote(Line *p, MMIOT* f)
j = nextnonblank(p, j+2);
if ( (f->flags & MKD_EXTRA_FOOTNOTE) && (T(foot->tag)[0] == '^') ) {
+ /* need to consume all lines until non-indented block? */
while ( j < S(p->text) )
EXPAND(foot->title) = T(p->text)[j++];
goto skip_to_end;
diff --git a/mkd2html.c b/mkd2html.c
index 819d528..a0b8c1a 100644
--- a/mkd2html.c
+++ b/mkd2html.c
@@ -159,7 +159,7 @@ char **argv;
" \n", markdown_version);
fprintf(output," ");
+ " content=\"text/html; charset=utf-8\">");
for ( i=0; i < S(css); i++ )
fprintf(output, " 0) && !isalpha(line[0]) )
(*outchar)('L',out);
+#endif
for ( i=0; i < size ; i++ ) {
c = line[i];
if ( labelformat ) {
if ( isalnum(c) || (c == '_') || (c == ':') || (c == '-') || (c == '.' ) )
(*outchar)(c, out);
else
+#if WITH_URLENCODED_ANCHOR
+ {
+ (*outchar)('%', out);
+ (*outchar)(hexchars[c >> 4 & 0xf], out);
+ (*outchar)(hexchars[c & 0xf], out);
+ }
+#else
(*outchar)('.', out);
+#endif
}
else
(*outchar)(c,out);