english: simplify or-markup-example.
parent
6a5d22c830
commit
03141d93c1
|
@ -119,5 +119,12 @@ IN: english
|
||||||
} } [ { object } or-markup-example ] unit-test
|
} } [ { object } or-markup-example ] unit-test
|
||||||
|
|
||||||
{ {
|
{ {
|
||||||
{ "an " { $link object } } " or " { "a " { $link pair } }
|
{ "an " { $link object } } " or "
|
||||||
|
{ "a " { $link pair } }
|
||||||
} } [ { object pair } or-markup-example ] unit-test
|
} } [ { object pair } or-markup-example ] unit-test
|
||||||
|
|
||||||
|
{ {
|
||||||
|
{ "an " { $link object } } ", "
|
||||||
|
{ "a " { $link pair } } ", or "
|
||||||
|
{ "a " { $snippet "thing" } }
|
||||||
|
} } [ { object pair "thing" } or-markup-example ] unit-test
|
||||||
|
|
|
@ -180,10 +180,10 @@ PRIVATE>
|
||||||
: or-markup-example ( classes -- markup )
|
: or-markup-example ( classes -- markup )
|
||||||
[
|
[
|
||||||
dup word? [
|
dup word? [
|
||||||
[ name>> a/an " " append ] [ \ $link swap 2array ] bi 2array
|
[ name>> ] keep \ $link
|
||||||
] [
|
] [
|
||||||
[ "\"" ?head drop a/an ] keep 1array \ $snippet prefix " " swap 3array
|
dup \ $snippet
|
||||||
] if
|
] if swap 2array [ a/an " " append ] dip 2array
|
||||||
] map "or" comma-list ;
|
] map "or" comma-list ;
|
||||||
|
|
||||||
: $or-markup-example ( classes -- )
|
: $or-markup-example ( classes -- )
|
||||||
|
|
Loading…
Reference in New Issue