d31d17d1e2
* Refactored the overall process flow. Instead of ``JLPMain`` handling the process, it now reads the command line options and defers to ``Processor`` to handle the actual process. The ``Processor`` instance is responsible for processing one batch of input files and holds all the state that is common to this process. * ``JLPBaseGenerator`` and generators based on it are now only responsible for handling one file, generating output from a source AST. As a consequence state that is common to the overall process is no longer stored in the generator but is stored on the ``Processor`` instance, which is exposed to the generators. * Generators can now be instantiated directly (instead of having just a public static method) and are no longer one-time use. Now the life of a generator is expected to be the same as the life of the ``Processor``. * Fixed inter-doc link behaviour. * Created some data classes to replace the ad-hoc maps used to store state in the generator (now in the ``Processor``)
26 lines
1.1 KiB
ReStructuredText
26 lines
1.1 KiB
ReStructuredText
Internal links are not smart enough about cross-file linking.
|
|
=============================================================
|
|
|
|
There are two main problems with internal linking as it works now:
|
|
|
|
1. The links are resolved relative to the directory of the file being processed
|
|
when they should be resolved relative to the root output directory.
|
|
|
|
For example, consider ``@org id1`` defined in ``dir/file1.src``, then
|
|
referenced in ``dir/file2.src`` in this manner: ``[link](jlp://id1``. The
|
|
url written in ``dir/file2.html`` is ``dir/file1.html#id1``. However, when
|
|
the page is viewed, this url is interpreted relative to the directory of the
|
|
current page. So if the docs live at ``file:///docs`` then the url will
|
|
resolve to ``file:///docs/dir/dir/file1.src#id1`` instead of
|
|
``file:///docs/dir/file1.html#id1``.
|
|
|
|
2. The links do substitute the ``html`` suffix to the file names in place of the
|
|
files' suffixes. In the above example note that the actual urls end in
|
|
``.src`` like the original input files, but the expected url ends in
|
|
``.html``.
|
|
|
|
========= ==========
|
|
Created: 2011-09-08
|
|
Resolved: 2011-09-09
|
|
========= ==========
|