= Details = Applies to:: 1.5.4 Purpose:: Disables automatic indentation of paragraphs based on initial whitespace. Description:: When MoinMoin encounters "pure" indentation--an indented paragraph without * or 1. markup--it "indents" the paragraph by treating it as a list item, opening a new list if required. MoinMoin already has an unbulleted list marked up with a dot (`.`), which performs the exact same function. This patch removes support for pure indentation, requiring a number, bullet or dot be used to create a list item. Removing pure indentation gains you two things: 1. You may add multiple paragraphs to a list item. Currently, a second paragraph is joined with the previous paragraph, or it is indented, depending on initial whitespace. Note that it is already possible to add certain block items inside a list item, such as a `pre` block, which appear at the same level as the main list item. This patch extends that to allow a second paragraph to be created at the same level as well. /!\ Try using an empty line (as usual for a new paragraph) and indent next paragraph by the same amount of space as you have before your "1.". Like you see HERE. :) As you can see, this suggestion does not work. It happens to work in the previous case because the parser starts a new paragraph when you have an icon at the beginning or the end, for whatever reason. In the general case, the lines will be joined, as HERE. Try adding a smiley to the beginning or end of this sentence and watch a p tag get output. In fact, I just noticed that any markup, including `backticks` or italics, will cause a p tag to be output around the entire paragraph (!), correctly rendering the output, like HERE. This appears to me to be a genuine bug. If it were fixed, it would eliminate this reason #1. 2. List text which is vertically aligned for aesthetic purposes, as you might write it in a plain text file, is not indented. This makes importing plain text simpler. With this change, the following markup: {{{ 1. This is a single paragraph This is another paragraph 1. This is the final list item }}} will render approximately like so: {{{ 1. This is a single paragraph This is another paragraph 2. This is the final list item }}} Without this patch, it is possible to make it ''appear'' that a second paragraph is embedded inside another list item. You would do this as follows: {{{ 1. This is a single paragraph . This is another paragraph 1. This is the final list item }}} While it happens to render correctly on the page, semantically, it is invalid. The additional paragraph becomes a separate, unbulleted list item, instead of a paragraph embedded within the first item. It is unlikely to convert correctly to another format, such as DocBook. There is another patch floating around which converts a "pure" indented paragraph within a list item into a separate unbulleted list item. This has the same semantic problem. = Problems = There are two issues with this patch. First, the ability to "blockquote" with pure indentation is gone. Since creating a blockquote is (again) done with an unbulleted list, blockquoting was already semantically incorrect, and I can live with the loss. Also, you can still manually create an unbulleted list using dot (`.`). In my opinion, blockquoting should have its own markup syntax which outputs an HTML `blockquote` tag. Second, normal list item text will be surrounded with paragraph (`p`) tags when output. The output is still valid HTML, but it's probably not ideal. This is mainly due to my inexperience with the Moin codebase and can probably be corrected. = Patch = ## we prefer that you send the patch in an attachment to avoid whitespace issues ## you should probably change the name of the attachment here {{attachment:moin-1.5.4-parindent-2.patch}} = Discussion = Updated patch to make sure that dot (`.`) opens a new list when required. -- JimUrsetto <> = Plan = ## This part is for Moin``Moin developers: * Priority: * Assigned to: * Status: ---- CategoryMoinMoinPatch