Move regex preparation into methods, use named subpatterns so the regex makes more sense. Fix the logic around eating newlines adjacent to tags. Update tests to reflect the changes.
8 lines
200 B
Plaintext
8 lines
200 B
Plaintext
{{grand_parent_id}}
|
|
{{#parent_contexts}}
|
|
{{parent_id}} ({{grand_parent_id}})
|
|
{{#child_contexts}}
|
|
{{child_id}} ({{parent_id}} << {{grand_parent_id}})
|
|
{{/child_contexts}}
|
|
{{/parent_contexts}}
|