Skip to content

Commit

Permalink
Support the provision of utterly unstructured text
Browse files Browse the repository at this point in the history
Previously, this required that the text already be broken up into
per-paragraph (or, better, per-section) units. Now this tries to do so
itself, if the text hasn't been prepared properly.
  • Loading branch information
waldoj committed Jun 12, 2013
1 parent 392452e commit 3dfa6ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions subsection-identifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ function parse()
*/
$prefixes = array();

/*
* If the text is a string, turn it into an object.
*/
if (is_string($this->text))
{
$this->text = (object) explode("\n\n", $this->text);
}

/*
* Deal with each subsection, one at a time.
*/
Expand Down

0 comments on commit 3dfa6ce

Please sign in to comment.