空行の削除、空行+行頭のスペースの削除、空行+行頭のスペース+改行の削除を行うMovable Type のグローバルモディファイアを追加するプラグインです。
Perl PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
compress_modifier
README.md

README.md

compress modifier

This is Movable Type Plugin that compresses a source code.

The following modes are recognized:

  • compress="1" Remove empty lines.
  • compress="2" Remove empty lines and white spaces of head of a line.
  • compress="3" Remove empty lines and white spaces of head of a line and break lines.

Usage

compress="1"

Template:

<mt:Unless compress="1">
<ul>

  <li>foo1</li>

  <li>foo2</li>

  <li>foo3</li>

</ul>
</mt:Unless>

Print:

<ul>
  <li>foo1</li>
  <li>foo2</li>
  <li>foo3</li>
</ul>

compress="2"

Template:

<mt:Unless compress="2">
<ul>

  <li>foo1</li>

  <li>foo2</li>

  <li>foo3</li>

</ul>
</mt:Unless>

Print:

<ul>
<li>foo1</li>
<li>foo2</li>
<li>foo3</li>
</ul>

compress="3"

Template:

<mt:Unless compress="3">
<ul>

  <li>foo1</li>

  <li>foo2</li>

  <li>foo3</li>

</ul>
</mt:Unless>

Print:

<ul><li>foo1</li><li>foo2</li><li>foo3</li></ul>