<document source="test data">
    <paragraph>
        A substitution definition defined using an if whose last element isn't #PCDATA.
    <system_message level="1" line="3" source="test data" type="INFO">
        <paragraph>
            No directive entry for "if" in module "Text::Restructured::Directive".
            Trying "if" as canonical directive name.
    <substitution_definition names="sub">
        Text ends with \n\
        <emphasis>
            emphasis
