rubyworks / qed

Quality Ensured Documentation

Home Page:http://rubyworks.github.com/qed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description + Code Block pairs

trans opened this issue · comments

In the earliest versions of QED a description section was associated with it's subsequent code section --they both were contained in a single object. Later versions split them into separate objects. At the time it seemed a better approach. However, support for plain text blocks brought that change into question. We were able to work around it, but it would have been much easier to implement if the old parsing scheme was kept. Now we would like to add Around advice, and that pretty much requires the old scheme to be put back. So a version or two down the road, that is what needs to happen.

Instead of putting together a description section and the subsequent code section, we have instead opted to use a two-way linked list. This makes it possible even to have a code section alter behavior based on a description any number of sections prior, and vice versa.