跳到主要内容

resolve-waypoints

resolve-waypoints(self, visible-subslides)(source)

Resolve waypoint labels in a visible-subslides specification.

Recursively replaces label references and waypoint marker dictionaries (get-first, get-last, from-wp, until-wp, prev-wp, next-wp) with their resolved subslide numbers / ranges using the waypoint mapping from self.waypoints.

Supports hierarchical labels: if <part> is not an exact match, all waypoints whose name starts with part: are combined into a single range.

When an array contains from-wp / until-wp markers the elements are combined into a bounded range (min of beginnings, max of ends): (from-wp(<a>), until-wp(<b>)) yields the range from <a> to just before <b>.

Parameters

self : dictionary

The presentation context containing waypoints.

Returns: int | str | array | dictionary