From: Fletcher T. Penney Date: Tue, 11 Jul 2017 04:09:41 +0000 (-0400) Subject: FIXED: Improve abbreviation support X-Git-Tag: 6.2.0^2~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71e1b7056962a14f3e1e9755227b33da8f40cbbf;p=multimarkdown FIXED: Improve abbreviation support --- diff --git a/Sources/libMultiMarkdown/writer.c b/Sources/libMultiMarkdown/writer.c index 4095243..ccf81ec 100644 --- a/Sources/libMultiMarkdown/writer.c +++ b/Sources/libMultiMarkdown/writer.c @@ -1642,28 +1642,30 @@ void automatic_search(mmd_engine * e, token * t, trie * ac) { automatic_search_text(e, t, ac); break; case DOC_START_TOKEN: - case BLOCK_PARA: - case BLOCK_H1: - case BLOCK_H2: - case BLOCK_H3: - case BLOCK_H4: - case BLOCK_H5: - case BLOCK_H6: + case BLOCK_BLOCKQUOTE: + case BLOCK_DEFINITION: + case BLOCK_DEFLIST: case BLOCK_LIST_BULLETED: case BLOCK_LIST_BULLETED_LOOSE: case BLOCK_LIST_ENUMERATED: case BLOCK_LIST_ENUMERATED_LOOSE: case BLOCK_LIST_ITEM_TIGHT: case BLOCK_LIST_ITEM: - case BLOCK_SETEXT_1: - case BLOCK_SETEXT_2: + case BLOCK_PARA: case BLOCK_TABLE: case BLOCK_TABLE_HEADER: case BLOCK_TABLE_SECTION: + case BLOCK_TERM: + case PAIR_BRACKET: + case PAIR_BRACKET_FOOTNOTE: + case PAIR_BRACKET_GLOSSARY: + case PAIR_BRACKET_IMAGE: case PAIR_QUOTE_DOUBLE: case PAIR_QUOTE_SINGLE: case PAIR_STAR: case PAIR_UL: + case TABLE_CELL: + case TABLE_ROW: automatic_search(e, t->child, ac); break; // case PAIR_PAREN: diff --git a/tests/MMD6Tests/Abbreviations.fodt b/tests/MMD6Tests/Abbreviations.fodt index c0497de..f7f4f43 100644 --- a/tests/MMD6Tests/Abbreviations.fodt +++ b/tests/MMD6Tests/Abbreviations.fodt @@ -310,6 +310,71 @@ bar foo bar BAZ (baz) + +foo bar + +15 + + + + + + + + foo + + + bar + + + + + + foo + + + bar + + + + +Table Update Fields to calculate numbers:foo bar + + +foo bar + +foo bar + +foo bar + + + + + +Figure Update Fields to calculate numbers: foo bar + + + +20 + +foo and bar + +foo and bar + + + + +foo + + + +foo + + +foo + + diff --git a/tests/MMD6Tests/Abbreviations.html b/tests/MMD6Tests/Abbreviations.html index b969a37..c0d942e 100644 --- a/tests/MMD6Tests/Abbreviations.html +++ b/tests/MMD6Tests/Abbreviations.html @@ -39,6 +39,72 @@

BAZ (baz)

+
+

foo bar

+
+ +

15

+ + + ++++ + + + + + + + + + + + + + + +
foo bar
foo bar
foo bar
+ +

foo bar

+ +

foo bar

+ +

foo bar

+ +
+foo bar +
foo bar
+
+ +

20

+ +

1

+ +

2

+ + + +
+
+
    + +
  1. +

    foo and bar  ↩

    +
  2. + +
  3. +

    foo and bar  ↩

    +
  4. + +
+
+ diff --git a/tests/MMD6Tests/Abbreviations.htmlc b/tests/MMD6Tests/Abbreviations.htmlc index d378824..22c6047 100644 --- a/tests/MMD6Tests/Abbreviations.htmlc +++ b/tests/MMD6Tests/Abbreviations.htmlc @@ -34,4 +34,37 @@ bar

[>(baz) BAZ]

+
+

foo bar

+
+ +

15

+ +

| foo | bar | +| --- | --- | +| foo | bar | +[foo bar]

+ +

foo bar

+ +

foo bar

+ +

foo bar

+ +

foo bar

+ +

20

+ +

[^foo and bar]

+ +

[^note]

+ + +

[>foo bar]: FOO BAR

+ +

[^note]: foo and bar

diff --git a/tests/MMD6Tests/Abbreviations.tex b/tests/MMD6Tests/Abbreviations.tex index 00ba9d6..501f833 100644 --- a/tests/MMD6Tests/Abbreviations.tex +++ b/tests/MMD6Tests/Abbreviations.tex @@ -57,5 +57,59 @@ fo'o fo'o \newacronym{baz}{baz}{BAZ}\gls{baz} +\begin{quote} +\gls{foo bar} +\end{quote} + +15 + +\begin{table}[htbp] +\begin{minipage}{\linewidth} +\setlength{\tymax}{0.5\linewidth} +\centering +\small +\caption{\gls{foo bar}} +\label{foobar} +\begin{tabulary}{\textwidth}{@{}ll@{}} \toprule + \gls{foo} & \gls{bar} \\ +\midrule + + \gls{foo} & \gls{bar} \\ +\bottomrule + +\end{tabulary} +\end{minipage} +\end{table} + +\part{foo bar } +\label{foobar} + +\section{foo bar } +\label{foobar} + +\part{foo bar} +\label{foobar} + +\begin{figure}[htbp] +\centering +\includegraphics[keepaspectratio,width=\textwidth,height=0.75\textheight]{http://foobar.net/} +\caption{\gls{foo bar}} +\end{figure} + +20 + +\footnote{\gls{foo} and \gls{bar}} + +\footnote{foo and bar} + +\begin{itemize} +\item{} foo + +\item{} foo + +\item{} \gls{foo} + +\end{itemize} + \input{mmd6-article-footer} \end{document} diff --git a/tests/MMD6Tests/Abbreviations.text b/tests/MMD6Tests/Abbreviations.text index c8b2b17..29aa768 100644 --- a/tests/MMD6Tests/Abbreviations.text +++ b/tests/MMD6Tests/Abbreviations.text @@ -34,6 +34,34 @@ foo bar [>(baz) BAZ] +> foo bar + +15 + +| foo | bar | +| --- | --- | +| foo | bar | +[foo bar] + +# foo bar # + +### foo bar ### + +foo bar +======= + +![foo bar](http://foobar.net/) + +20 + +[^foo and bar] + +[^note] + +* foo +* foo +* foo + [>foo]: FOO [>f.o.o.]: F.O.O. @@ -48,3 +76,5 @@ foo bar [>ba'r]: BA'R [>foo bar]: FOO BAR + +[^note]: foo and bar