dmulyalin / ttp

Template Text Parser
MIT License
351 stars 34 forks source link

null path handling issue #5

Closed dmulyalin closed 4 years ago

dmulyalin commented 4 years ago

template:

<input load="text">
router bgp 65100
 rid 1.1.1.1
 !
 address-family ipv4 vrf vrf_name
  redistribute ospf 321 match internal external 1 external 2 route-map vrf_nameSVRF-OSPF->BGP
</input>

<group name="BGP">
router bgp 65100{{ _start_ }}
## rid {{ rid }}
<group name="_">
 address-family ipv4 vrf vrf_name {{ _start_ }}
  redistribute ospf 321 match internal external 1 external 2 route-map {{ ospf_to_bgp_redistr_rpl }}
</group>
</group>

produces:

"BGP": {
            "_": {},
            "ospf_to_bgp_redistr_rpl": "vrf_nameSVRF-OSPF->BGP"
        }

while should produce:

"BGP": {
            "ospf_to_bgp_redistr_rpl": "vrf_nameSVRF-OSPF->BGP"
        }
dmulyalin commented 4 years ago

issue fixed since commit 19dfec3, added test 1-45 and 1-46 to verify proper behaviour.