< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事
N :次の記事
|<:スレッドの先頭
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
On Mon, Oct 3, 2011 at 11:05 AM, Jim Freeze <jimfreeze / gmail.com> wrote:
> How does String#margin behave when given irregular input?
> For example
> string = <<-END.margin
> <tab>|doc
> <3spaces>|doc
> <1space>|doc
> doc
> doc
> END
It takes the first non-whitespace character to be the indent marker,
so in the case it's controlling the margin using '<', and you get:
tab>|doc
3spaces>|doc
1space>|doc
doc
doc
> On Mon, Oct 3, 2011 at 10:00 AM, Trans <transfire / gmail.com> wrote:
>>
>> On Mon, Oct 3, 2011 at 8:16 AM, Yusuke Endoh <mame / tsg.ne.jp> wrote:
>>
>> > How about importing String#margin from Facets?
>> >
>> > my_string = <<-END.margin
>> > |doc
>> > |doc
>> > |doc
>> > END
>> >
>> > p my_string #=> "doc\ndoc\ndoc"
>> >
>> >
>> >
>> > http://rubyworks.github.com/facets/doc/api/core/String.html#method-i-margin
>>
>> Yes, in fact #margin was born from the idea of %L. The downside of
>> #margin is that it requires more processing overhead, where as the
>> literal notation would be very fast (if it is possible to implement in
>> Ruby parser).
>>
>
>
>
> --
> Jim Freeze
>
--
Sorry, says the barman, we don't serve neutrinos. A neutrino walks into a bar.
Trans <transfire / gmail.com>
7r4n5.com http://7r4n5.com