set_paths

Overview

MojoMojo uses a function called set_paths to coordinate internal page links among other things1. This paper will examine it to better understand its behavior.

Properties

First Time Page Edits

When editing a page for the first time, one experiences of quirkiness with internal links in the rendering of preview. What happens is the rendered internal link is not fully aware of its location. It wants to place the internal link at the same level of the current node, when it should be a subnode.

For example, [[child?]] will render as a sibling link on the first edit. Once the first edit is saved, then the view is proper. Furthermore, andany subsequent edits render additionalthe linkschild correctlylink fromor theany startnewly added children links correctly.


  1. The author is not sure of the scope of set_paths, thus this paper. ↩