]> granicus.if.org Git - multimarkdown/commitdiff
FIXED: Improve abbreviation support
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 11 Jul 2017 04:09:41 +0000 (00:09 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 11 Jul 2017 04:09:41 +0000 (00:09 -0400)
Sources/libMultiMarkdown/writer.c
tests/MMD6Tests/Abbreviations.fodt
tests/MMD6Tests/Abbreviations.html
tests/MMD6Tests/Abbreviations.htmlc
tests/MMD6Tests/Abbreviations.tex
tests/MMD6Tests/Abbreviations.text

index 4095243711b0fcef06fb3304bb9dd3b18a5df833..ccf81eca12d62d62d593754b2453775d93db3378 100644 (file)
@@ -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:
index c0497de7add4608c5f6e80ef88b329dc5e65271a..f7f4f4375d160205991dc0d46ab3193f32a31bd6 100644 (file)
@@ -310,6 +310,71 @@ bar</text:p>
 <text:p text:style-name="Standard">foo bar</text:p>
 
 <text:p text:style-name="Standard">BAZ (baz)</text:p>
+
+<text:p text:style-name="Quotations">foo bar</text:p>
+
+<text:p text:style-name="Standard">15</text:p>
+
+<table:table>
+<table:table-column/>
+<table:table-column/>
+
+<table:table-row>
+<table:table-cell>
+<text:p text:style-name="Table_20_Heading"> foo </text:p>
+</table:table-cell>
+<table:table-cell>
+<text:p text:style-name="Table_20_Heading"> bar </text:p>
+</table:table-cell>
+</table:table-row>
+
+<table:table-row>
+<table:table-cell>
+<text:p text:style-name="MMD-Table"> foo </text:p>
+</table:table-cell>
+<table:table-cell>
+<text:p text:style-name="MMD-Table"> bar </text:p>
+</table:table-cell>
+</table:table-row>
+
+</table:table>
+<text:p><text:bookmark text:name="foobar"/>Table <text:sequence text:name="Table" text:formula="ooow:Table+1" style:num-format="1"> Update Fields to calculate numbers</text:sequence>:foo bar<text:bookmark-end text:name="foobar"/></text:p>
+
+
+<text:h text:outline-level="1"><text:bookmark text:name="foobar"/>foo bar </text:h>
+
+<text:h text:outline-level="3"><text:bookmark text:name="foobar"/>foo bar </text:h>
+
+<text:h text:outline-level="1"><text:bookmark text:name="foobar"/>foo bar</text:h>
+
+<text:p text:style-name="Standard"><draw:frame text:anchor-type="as-char"
+draw:z-index="0" draw:style-name="fr1" svg:width="95%">
+<draw:text-box><text:p><draw:frame text:anchor-type="as-char" draw:z-index="1" >
+<draw:image xlink:href="http://foobar.net/" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="&lt;All formats&gt;"/>
+</draw:frame></text:p>
+<text:p>Figure <text:sequence text:name="Figure" text:formula="ooow:Figure+1" style:num-format="1"> Update Fields to calculate numbers</text:sequence>: foo bar</text:p>
+</draw:text-box></draw:frame>
+</text:p>
+
+<text:p text:style-name="Standard">20</text:p>
+
+<text:p text:style-name="Standard"><text:note text:id="fn1" text:note-class="footnote"><text:note-body><text:p text:style-name="Footnote">foo and bar</text:p></text:note-body></text:note></text:p>
+
+<text:p text:style-name="Standard"><text:note text:id="fn2" text:note-class="footnote"><text:note-body><text:p text:style-name="Footnote">foo and bar</text:p></text:note-body></text:note></text:p>
+
+<text:list text:style-name="L1">
+<text:list-item>
+<text:p text:style-name="P1">
+foo</text:p></text:list-item>
+
+<text:list-item>
+<text:p text:style-name="P1">
+foo</text:p></text:list-item>
+
+<text:list-item>
+<text:p text:style-name="Standard">foo</text:p></text:list-item>
+
+</text:list>
 </office:text>
 </office:body>
 </office:document>
index b969a37ac8f54c803316921ba3090f7649b3364b..c0d942ea8ac454c79227689e6434dcd4ba9e1776 100644 (file)
 
 <p>BAZ (<abbr title="BAZ">baz</abbr>)</p>
 
+<blockquote>
+<p><abbr title="FOO BAR">foo bar</abbr></p>
+</blockquote>
+
+<p>15</p>
+
+<table>
+<caption style="caption-side: bottom;" id="foobar"><abbr title="FOO BAR">foo bar</abbr></caption>
+<colgroup>
+<col />
+<col />
+</colgroup>
+
+<thead>
+<tr>
+       <th> <abbr title="FOO">foo</abbr> </th>
+       <th> <abbr title="BAR">bar</abbr> </th>
+</tr>
+</thead>
+
+<tbody>
+<tr>
+       <td> <abbr title="FOO">foo</abbr> </td>
+       <td> <abbr title="BAR">bar</abbr> </td>
+</tr>
+</tbody>
+</table>
+
+<h1 id="foobar">foo bar </h1>
+
+<h3 id="foobar">foo bar </h3>
+
+<h1 id="foobar">foo bar</h1>
+
+<figure>
+<img src="http://foobar.net/" alt="foo bar" />
+<figcaption><abbr title="FOO BAR">foo bar</abbr></figcaption>
+</figure>
+
+<p>20</p>
+
+<p><a href="#fn:1" id="fnref:1" title="see footnote" class="footnote"><sup>1</sup></a></p>
+
+<p><a href="#fn:2" id="fnref:2" title="see footnote" class="footnote"><sup>2</sup></a></p>
+
+<ul>
+<li>foo</li>
+<li>foo</li>
+<li><abbr title="FOO">foo</abbr></li>
+</ul>
+
+<div class="footnotes">
+<hr />
+<ol>
+
+<li id="fn:1">
+<p><abbr title="FOO">foo</abbr> and <abbr title="BAR">bar</abbr> <a href="#fnref:1" title="return to body" class="reversefootnote">&#160;&#8617;</a></p>
+</li>
+
+<li id="fn:2">
+<p>foo and bar <a href="#fnref:2" title="return to body" class="reversefootnote">&#160;&#8617;</a></p>
+</li>
+
+</ol>
+</div>
+
 </body>
 </html>
 
index d37882419947a84b4fffca6574d7a0024fa1843c..22c604733b1bfb85e2173490102d8af4545d1eeb 100644 (file)
@@ -34,4 +34,37 @@ bar</p>
 
 <p>[>(baz) BAZ]</p>
 
+<blockquote>
+<p>foo bar</p>
+</blockquote>
+
+<p>15</p>
+
+<p>| foo | bar |
+| --- | --- |
+| foo | bar |
+[foo bar]</p>
+
+<h1>foo bar </h1>
+
+<h3>foo bar </h3>
+
+<h1>foo bar</h1>
+
+<p><img src="http://foobar.net/" alt="foo bar" /></p>
+
+<p>20</p>
+
+<p>[^foo and bar]</p>
+
+<p>[^note]</p>
+
+<ul>
+<li>foo</li>
+<li>foo</li>
+<li>foo</li>
+</ul>
+
 <p>[>foo bar]: FOO BAR</p>
+
+<p>[^note]: foo and bar</p>
index 00ba9d6e1646e5399730a06370d4f388c71322cc..501f833dde002f0978913f65d3f5970254932a08 100644 (file)
@@ -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}
index c8b2b17b610c851ec11c524cd01411720eaa0060..29aa76888c043c66069d9ce01331fa36376caff4 100644 (file)
@@ -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