Skip to content

Half of doc-pl is all bold #247

Open

Description

@alfsb

While developing a fix for doc-pl build failures, I stubbed on this. Running:

git -C phd checkout 5f10df173f923d261fa0ae3aa3b2f5778b327e73
php zpr-doc-base/configure.php --with-lang=pl -q
php phd/render.php -d zpr-doc-base/.manual.xml -f bigxhtml

Generates thousands of:

[11:57:01 - E_WARNING             ] /home/andre/phpdoc-test/phd/phpdotnet/phd/Package/Generic/XHTML.php:1899
preg_match(): Unknown modifier '/'

PhD checkout at 5f10df because I'm stuck with PHP 8.1. zpr-doc-base is php/doc-base#277 , otherwise doc-pl wont validate.

This may be related or not with rendered doc-pl having half of the manual rendered with <strong> wrapping all tags after some point.

Image

Activity

  1. sobcz commented on Jul 19, 2026

    @sobcz

    Unknown modifiers seem to happen because of this in doc-pl/language-snippets.ent:

    <!ENTITY rnp.parameter.loadsave-flags 'Zobacz opisy flag <constant xmlns="http://docbook.org/ns/docbook">RNP_LOAD_SAVE_<replaceable>*.
    </replaceable></constant> flags description.'>
    

    If I change it to one line, same as doc-en and some others have it, warnings go away:

    <!ENTITY rnp.parameter.loadsave-flags 'Zobacz opisy flag <constant xmlns="http://docbook.org/ns/docbook">RNP_LOAD_SAVE_<replaceable>*</replaceable></constant> flags description.'>
    

    Excessive bold in language/predefined/variables/superglobals.xml is because of empty <title></title> which produces single <strong> in output.

  2. alfsb commented on Jul 20, 2026

    @alfsb
    MemberAuthor

    Excessive bold in language/predefined/variables/superglobals.xml is because of empty <title></title> which produces single \<strong\> in output.

    Thanks for the detailed analysis. The empty <title> probably originates in the XML fixups that configure.php does, in the attempt to remove <xi:fallback>s from the sources. I will try to change it to avoid this collapsing of title tags.

    This may have an easy fix, but is something that I cannot test. Finding and replacing the final $dom->save() or $dom->saveXML() by saveHTML() or saveHTMLFile() may fix this (and many other) mysterious rendering bugs.

  3. alfsb commented on Aug 14, 2026

    @alfsb
    MemberAuthor

    As today, most of doc-pl is rendered in bold, even after changing fix ups in doc-base/configure.php to avoid empty titles, but only in "big" formats (in particular with --package PHP --format php --format xhtml --format bigxhtml). The bold start is near the text "Referencje do wszystkich zmiennych w zasięgu globalnym".

    The warning is still present, but only in some languages, I think in the most outdated ones, so it may not be worth debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions