-
Notifications
You must be signed in to change notification settings - Fork 55
Fix GH-152 + GH-213: Admonition id propagation and semantic title #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lacatoire
wants to merge
2
commits into
php:master
Choose a base branch
from
lacatoire:fix/gh-152-213-admonition-rendering
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+137
−4
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --TEST-- | ||
| Admonition rendering (GH-152 id propagation + GH-213 semantic title) | ||
| --FILE-- | ||
| <?php | ||
| namespace phpdotnet\phd; | ||
|
|
||
| require_once __DIR__ . "/../../setup.php"; | ||
|
|
||
| $xmlFile = __DIR__ . "/data/admonition_rendering.xml"; | ||
|
|
||
| $config->xmlFile = $xmlFile; | ||
|
|
||
| $format = new TestPHPChunkedXHTML($config, $outputHandler); | ||
|
|
||
| $render = new TestRender(new Reader($outputHandler), $config, $format); | ||
|
|
||
| $render->run(); | ||
| ?> | ||
| --EXPECT-- | ||
| Filename: admonition_rendering.html | ||
| Content: | ||
| <div id="admonition_rendering" class="chapter"> | ||
|
|
||
| <div class="section"> | ||
| <p class="para">1. Warning with xml:id</p> | ||
| <div class="warning" id="warn.test"><h5 class="warning">Warning</h5> | ||
| <p class="para">This is a warning with an id.</p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="section"> | ||
| <p class="para">2. Caution without xml:id</p> | ||
| <div class="caution"><h5 class="caution">Caution</h5> | ||
| <p class="para">This is a caution without an id.</p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="section"> | ||
| <p class="para">3. Tip with xml:id</p> | ||
| <div class="tip" id="tip.test"><h5 class="tip">Tip</h5> | ||
| <p class="para">This is a tip with an id.</p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="section"> | ||
| <p class="para">4. Note with xml:id</p> | ||
| <blockquote class="note" id="note.test"><p><h5 class="note">Note</h5>: | ||
| <p class="para">This is a note with an id.</p> | ||
| </p></blockquote> | ||
| </div> | ||
|
|
||
| <div class="section"> | ||
| <p class="para">5. Important without xml:id</p> | ||
| <div class="important"><h5 class="important">Important</h5> | ||
| <p class="para">This is an important without an id.</p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="section"> | ||
| <p class="para">6. Warning with constructorsynopsis</p> | ||
| <div class="warning"><h5 class="warning">Warning</h5> | ||
| <p class="para">This constructor is deprecated:</p> | ||
| <div class="constructorsynopsis dc-description"><span class="modifier">public</span> | ||
| <span class="methodname"><strong>ClassName::__construct</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.html" class="type string">string</a></span> <code class="parameter">$param</code></span>)</div> | ||
|
|
||
| </div> | ||
| </div> | ||
|
|
||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <chapter xml:id="admonition_rendering" xmlns="http://docbook.org/ns/docbook"> | ||
|
|
||
| <section> | ||
| <para>1. Warning with xml:id</para> | ||
| <warning xml:id="warn.test"> | ||
| <para>This is a warning with an id.</para> | ||
| </warning> | ||
| </section> | ||
|
|
||
| <section> | ||
| <para>2. Caution without xml:id</para> | ||
| <caution> | ||
| <para>This is a caution without an id.</para> | ||
| </caution> | ||
| </section> | ||
|
|
||
| <section> | ||
| <para>3. Tip with xml:id</para> | ||
| <tip xml:id="tip.test"> | ||
| <para>This is a tip with an id.</para> | ||
| </tip> | ||
| </section> | ||
|
|
||
| <section> | ||
| <para>4. Note with xml:id</para> | ||
| <note xml:id="note.test"> | ||
| <para>This is a note with an id.</para> | ||
| </note> | ||
| </section> | ||
|
|
||
| <section> | ||
| <para>5. Important without xml:id</para> | ||
| <important> | ||
| <para>This is an important without an id.</para> | ||
| </important> | ||
| </section> | ||
|
|
||
| <section> | ||
| <para>6. Warning with constructorsynopsis</para> | ||
| <warning> | ||
| <para>This constructor is deprecated:</para> | ||
| <constructorsynopsis> | ||
| <modifier>public</modifier> | ||
| <methodname>ClassName::__construct</methodname> | ||
| <methodparam><type>string</type><parameter>param</parameter></methodparam> | ||
| </constructorsynopsis> | ||
| </warning> | ||
| </section> | ||
|
|
||
| </chapter> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.