Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prefix "page-" to target name when adding page content to cache
This PR adds prefix "page-" to the target name when adding a page content to the cache. * In `lookup_page` function, it adds prefix "page-" to the target name when lookup. * However, when adding a page content to the cache (i.e. `build_env_for_page` -> `build` -> `add_unit_to_cache`), it did not add the prefix. This discrepancy introduced an incorrect reference resolution when there is the same name of page and module. For example, suppose we have a module `Foo` and a page `Foo.mld` and `Foo.mld` includes a reference to `Foo`, i.e. `{!module-Foo}`. 1. It invokes `build_env_for_page` for the page `Foo.mld`. Now, the cache has a mapping for `Foo`, but its value includes the page content only. 2. When resolving `{!module-Foo}`, it tries to find it from the cache. It found, but the result is not for the unit contents. 3. It fails to make a correct link in `Foo.mld`.
- Loading branch information