Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions phpdotnet/phd/Package/Generic/XHTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,9 @@ public function format_constant($open, $name, $attrs, $props)
$this->pushRole("constant_group");
$this->cchunk["constant"] = $props["innerXml"];
}
if (isset($attrs[Reader::XMLNS_XML]["id"])) {
return '<strong id="' . $attrs[Reader::XMLNS_XML]["id"] . '"><code>';
}
return "<strong><code>";
}

Expand Down
16 changes: 16 additions & 0 deletions tests/package/php/constant_links_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,20 @@ Content:
</p>
</div>

<div class="section">
<p class="para">5. Constants sharing a description have their own ID</p>
<dl>

<dt>
<strong id="constant.first-alias"><code>FIRST_ALIAS</code></strong>,
<strong id="constant.second-alias"><code>SECOND_ALIAS</code></strong>
(<span class="type"><a href="language.types.boolean.html" class="type bool">bool</a></span>)
</dt>
<dd>
<p class="simpara">Shared description</p>
</dd>

</dl>
</div>

</div>
16 changes: 16 additions & 0 deletions tests/package/php/data/constant_links.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,20 @@
</para>
</section>

<section>
<para>5. Constants sharing a description have their own ID</para>
<variablelist>
<varlistentry>
<term>
<constant xml:id="constant.first-alias">FIRST_ALIAS</constant>,
<constant xml:id="constant.second-alias">SECOND_ALIAS</constant>
(<type>bool</type>)
</term>
<listitem>
<simpara>Shared description</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>

</chapter>