Changes from MMD 5

Fletcher T. Penney edited this page Mar 7, 2017 · 3 revisions

In addition to being much faster, MMD 6 is designed to be more consistent and accurate in its parsing, particularly around various edge cases. This does mean a few changes from existing behavior.

  1. Setext headers can contain more than one line of text, e.g.:

     foo
     bar
     ===
    
  2. Whitespace is not allowed between the text and label brackets in reference links, images, etc. This means that [foo][bar] is no longer the same as [foo] [bar].

  3. Link and image titles can be quoted using 'foo', "foo", or (foo).

  4. Link and image attributes can be used with the explicit format -- [foo](http://bar.net/ "title" width=40px)

  5. HTML elements are handled slightly differently. There is no longer a markdown="1" feature. Instead, HTML elements that are on a line by themselves will open an HTML block that will cause the rest of the "paragraph" to be treated as HTML such that Markdown will not be parsed in side of it. HTML block-level tags are even "stronger" at starting an HTML block. It is not quite as complex as the approach used in CommonMark, but is similar under most circumstances.

    For example, this would not be parsed:

     <div>
     *foo*
     </div>
    

    But this would be:

     <div>
    
     *foo*
    
     </div>
    
  6. Table captions must come immediately after the table, not before it.

  7. Glossary entries and abbreviations have a new syntax, that is basically converging on that used by footnotes and citations. Abbreviations use the [>foo] syntax (shortening the full text down to the abbreviation), and glossary terms use [?foo] (providing an answer to the question "What is foo?").

     [>HTML]
     [?MultiMarkdown]
    
     [>HTML]: HyperText Markup Language
     [?MultiMarkdown]: A lightweight markup language...
    

    Both allow inline variants in addition to reference versions.

     [>(HTML) HyperText Markup Language]
     [?(MultiMarkdown) A lightweight markup language...]
    
  8. For now, however, you have to manually mark each instance of glossary terms or abbreviations in the document with the above syntax (just like links and images.) This allows the use of abbreviations without a large performance hit like the old version. I am still planning on adding back support for automatically identifying uses of abbreviated terms in the source (and the same could be done for glossary terms as well).

  9. LaTeX and ODF formats now use the native Table of Contents functionality rather than a simple list.