Skip to content

Commit

Permalink
Fix for tags extraction being broken, after container inlining was im…
Browse files Browse the repository at this point in the history
…plemented
  • Loading branch information
joethephish committed Oct 16, 2016
1 parent 12256e9 commit b23db3b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ink-engine-runtime/Story.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1585,13 +1585,16 @@ List<string> TagsAtStartOfFlowContainerWithPathString (string pathString)

// Expected to be global story, knot or stitch
var flowContainer = ContentAtPath (path) as Container;

// First element of the above constructs is a compiled weave
var innerWeaveContainer = flowContainer.content [0] as Container;
while(true) {
var firstContent = flowContainer.content [0];
if (firstContent is Container)
flowContainer = (Container)firstContent;
else break;
}

// Any initial tag objects count as the "main tags" associated with that story/knot/stitch
List<string> tags = null;
foreach (var c in innerWeaveContainer.content) {
foreach (var c in flowContainer.content) {
var tag = c as Runtime.Tag;
if (tag) {
if (tags == null) tags = new List<string> ();
Expand Down

0 comments on commit b23db3b

Please sign in to comment.