Here is a stab of Eliot's approach...


Oops.  I meant of course
| patterns first second Firsts Seconds |
patterns :=  #('{|' '|-' '|}' '{{' '}}' '[[' ']]' '__' '==' '::' '**' '##' '''').
Firsts ifNil:
   [Firsts := ((patterns collect: #first) as: Set) as: String.
    Seconds  := ((patterns collect: #second) as: Set) as: String].
self size >= 2
and: [(Firsts includes: (first := self first))
and: [(Seconds includes: (second := sef second)
and: [patterns includes: (ByteString with: first with: second)]]]



adapted towards a workspace.


| ios patterns firsts seconds|
ios := ReadStream on: 'Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...|-'.
patterns :=  #('{|' '|-' '|}' '{{' '}}' '[[' ']]' '__' '==' '::' '**' '##' '''''').
firsts := ((patterns collect: #first) as: Set).
seconds  := ((patterns collect: #second) as: Set).
[(ios size >= 2) & (ios peek notNil) ]
      whileTrue:[
            ((firsts includes: (first := ios next))
              and: [(seconds includes: (second := ios peek))]
              and: [patterns includes: (ByteString with: first with: second)])
                        ifTrue:[^true]]
cordially