#markup-end

catch name

Syntax
#markup-end event
    


Purpose

Use #markup-end to signal the end of a markup-region-event to a do markup-parse. A signal to #markup-end must be paired with a matching signal to #markup-start, with both referring to the same event (see ==).

The element rules in the following example merge consecutive para elements in each section into one:

  global markup-region-event first-para-event variable to 1
  
  element "section"
     output "%c"
     do when number of first-para-event = 1
        signal throw #markup-end first-para-event
        clear first-para-event
     done
  
  
  element "para"
     do when number of first-para-event = 0
        signal throw #markup-start #current-markup-event
        set new first-para-event to #current-markup-event
     done
     output #content
          

Related Concepts