Skip to content

Indentation fixing #47

Description

@NickSdot

The simpara in this example is misaligned. Perhaps a good follow up for indentation fixers (sniffers might should use warn/info instead error).

Current:

  <para>
   <example>
      <title>ImagickPixel <function>getColorCount</function></title>
      <programlisting role="php">
      <![CDATA[
<?php
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $histogramElements = $imagick->getImageHistogram();
    $lastColor = array_pop($histogramElements);
    echo "Last pixel color count is: ".$lastColor->getColorCount();
?>
]]>
      </programlisting>
        <simpara>
The output for this will be similar to:
    </simpara>
    <screen role="php">
<![CDATA[
Last pixel color count is: 256244
]]>
    </screen>
    </example>
  </para>

Expected:

  <para>
   <example>
      <title>ImagickPixel <function>getColorCount</function></title>
      <programlisting role="php">
      <![CDATA[
<?php
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $histogramElements = $imagick->getImageHistogram();
    $lastColor = array_pop($histogramElements);
    echo "Last pixel color count is: ".$lastColor->getColorCount();
?>
]]>
      </programlisting>
      <simpara>
          The output for this will be similar to:
       </simpara>
       <screen role="php">
<![CDATA[
Last pixel color count is: 256244
]]>
       </screen>
    </example>
  </para>

Edit

The current indentation fixer also doesn't yet work fully smooth. Leading whitespace is normalised as if it is wrong whitespace dupllication, although it should reformat the elements correctly

        <row>
         <entry><literal>"compression_alg"</literal></entry>
         <entry>string</entry>
         <entry>Compression algorithm. Both
-	   <literal>"compression_alg"</literal> and <literal>"compression_level"</literal>
-	   must be set in order to enable data compression.
-	 </entry>
+    <literal>"compression_alg"</literal> and <literal>"compression_level"</literal>
+    must be set in order to enable data compression.
+  </entry>
        </row>
Image

Note to self: we might should make fixer order canonical.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions