Preface elements are now rendered inline in the parent page instead of
being chunked into separate pages. Explicit annotations like
chunk:true or phd:chunk="true" can still force chunking.
Both sdesc and ldesc are always initialized as "" in storeInfo() and
populated with htmlentities(trim(...)) results, so they are always
strings. Using empty() is overly broad here since it would also treat
a legitimate "0" value as empty. Replace with === "" for precision.
The third occurrence in Package/PEAR/Web.php was already removed in
commit 53f9afe.
- Move error handling code into a class and remove PhD message output handling from it.
- Introduce a new class to handle PhD message output.
- Make the implicit dependency on the output functionality of classes explicit.
- Update PEAR package.xml.
- Fix tests.
- Use proper variadic parameters
- Use class constants
- Use first-class callable syntax
---------
Co-authored-by: haszi <haszika80@gmail.com>
* Add Config as a dependency to Format and all it subclasses
* Inject Config into every Format subclass at instantiation
---------
Co-authored-by: haszi <haszika80@gmail.com>
Replace static example element counter with class properties in Index and generic XHTML.
Add tests.
Refactor TestRender so that it can render multiple formats.
Co-authored-by: haszi <haszika80@gmail.com>
* Add rendering support for new class and exception markup
Add rendering support for new class and exception markup in the PHP package.
Add tests for the old and the new class and exception markup.
* Add indexing support for new class and exception markup
* Make PhD aware of the current class or exception name when using the new markup
When a reference element has the appropriate roles, store the name of the current class or exception. If this is not done, PhD will generate links to the class even from the class's own synopsis page.
* Fix code formatting differences in screen elements
* Add tests comparing old and new markup rendering output
---------
Co-authored-by: haszi <haszika80@gmail.com>
Remove spurious entries some language documentations have in the function/method listing. The spurious entries were the stream wrapper and context options which were listed in refentry elements. PhD assumes that refentry elements are always functions/methods. Fix this by giving stream wrappers and context options a role attribute with an appropriate value and handling these roles/values during indexing in PhD.
Co-authored-by: haszi <haszika80@gmail.com>
Add new IndexRepository class to handle all database access.
Inject IndexRepository as a dependency into the constructor of Index and use that instead of directly accessing the database.
Add basic indexing test.
Fix existing test that uses indexing to use IndexRepository.
* Add Format as an optional constructor dependency to TestRender
Add Format as an optional constructor dependency to TestRender.
Check format's methods conditionally.
Refactor tests to inject formats.
* Add Config as a constructor dependency to TestRender
Add Config as a constructor dependency to TestRender.
Refactor tests to inject Config.
* Add Index as an optional constructor dependency to TestRender
* TestRender to extend Render
* Config to allow calling instance methods
* Refactor test helpers and test directory structure
Refactor TestRender to use only constructor injected objects.
Rename test format helper classes to indicate which package they belong to.
Move TestRender and all format helper classes into the phpdotnet phd directory to enable autoloading.
Remove all unnecessary lines from setup.php.
Restructure test directory to follow the structure of the tested classes.
---------
Co-authored-by: haszi <haszika80@gmail.com>
This patch adds some missing newlines and trims multiple redundant
newlines into a single newline.
According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.
C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."
Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
# Useful for linking to specific examples via irc/email for example
# And will make it possible to create an example listing like we have always wanted
- Don't explicitly commit the index, do it when finalizing it
- Don't talk about .manual.xml, just say "Docbook file"
- Simplify attaching formats
- Kill commented out method