fletcher/MultiMarkdown-6

CriticMarkup and blank lines

Open

#41 geöffnet am 11. März 2017

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C (97 Forks)github user discovery
enhancementhelp wanted

Repository-Metriken

Stars
 (680 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

CriticMarkup is a powerful concept, but does require a bit of thought.

  1. The syntax is orthogonal to that of HTML, and therefore Markdown/MultiMarkdown. It should really be thought of as a separate "layer" of markup -- one that needs to be processed before parsing the underlying MultiMarkdown.

  2. This leads to additional complexity, as many users would prefer to use CriticMarkup as an additional feature of MultiMarkdown, that allows displaying the added/deleted/etc. text in the HTML output(using <ins>, <del>, etc.). In this instance, CriticMarkup needs to be carefully wrapped around, or inside, the underlying Markdown -- not "crossing the streams". For example:

     This is {++**good**++}.
    
     This is **{++not**++}.
    
  3. Similarly, CriticMarkup becomes difficult to process when used around newlines. For example, using CriticMarkup to describe the act of splitting an existing paragraph into two new paragraphs is tricky, as it requires that MMD "understands" that the opening {++ in the first paragraph connects to the closing ++} in the second paragraph, which violates the normal rules of Markdown:

     This is one para.{++
    
     ++} That is now two.
    
  4. An alternative could be to require that such CriticMarkup start and end with the opening/closing tags on their own separate lines. This could allow the MMD parser to recognize a CriticMarkup "chunk" and treat it as it's own block:

     This is one para.
     {++
    
     ++}
     That is now two.
    
  5. Another alternative is to create a separate CriticMarkup parsing step that finds all CriticMarkup and handles accepting or rejecting it, prior to the regular MMD parsing. This would be similar to what happened in MMD version 5.

For now, CriticMarkup doesn't play well "across" paragraphs in MMD. I will consider ways of addressing this in the future, and welcome input!

Contributor Guide