Skip to content

Commit

Permalink
declare using MyST -> AST
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jul 17, 2023
1 parent 946875d commit 48a3c23
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 44 deletions.
12 changes: 5 additions & 7 deletions test/unit/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
```{eval-rst}
Test: Build all files
=====================
# Test: Build all files

.. toctree::
:glob:
:::{toctree}
:glob:

**
```
**
:::
68 changes: 45 additions & 23 deletions test/unit/method.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,49 @@
<?xml version="1.0"?>
<div class="body" role="main">
<dl class="php method">
<dt class="sig sig-object php" id="Foo::simplify">
<span class="sig-name descname">
<span class="pre">simplify</span>
</span>
<span class="sig-paren">(</span>
<span class="sig-paren">)</span>
<a class="headerlink" href="#Foo::simplify" title="Permalink to this definition">&#xB6;</a>
</dt>
<dd>
<p>Simplify expression.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd">
<ul class="simple">
<li>
<p><strong>$args</strong> (<span><code class="xref php php-obj docutils literal notranslate"><span class="pre">array</span></code></span>) &#x2013; Associative array</p>
</li>
</ul>
</dd>
</dl>
</dd>
</dl>
<section id="simple-method">
<h1>Simple method<a class="headerlink" href="#simple-method" title="Permalink to this heading">&#xB6;</a></h1>
<dl class="php class">
<dt class="sig sig-object php" id="Foo">
<em class="property">
<span class="pre">class</span>
</em>
<span class="sig-name descname">
<span class="pre">Foo</span>
</span>
<a class="headerlink" href="#Foo" title="Permalink to this definition">&#xB6;</a>
</dt>
<dd/>
</dl>
<dl class="php method">
<dt class="sig sig-object php" id="Foo::test"><span class="sig-prename descclassname"><span class="pre">Foo::</span></span><span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">$a</span></em>, <em class="sig-param"><span class="pre">...$args</span></em><span class="sig-paren">)</span><a class="headerlink" href="#Foo::test" title="Permalink to this definition">&#xB6;</a></dt>
<dd>
<p>Simple test method.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd">
<ul class="simple">
<li>
<p><strong>$args</strong> (<span><code class="xref php php-obj docutils literal notranslate"><span class="pre">array</span></code></span>) &#x2013; Associative array</p>
</li>
</ul>
</dd>
</dl>
</dd>
</dl>
<section id="cross-linking">
<h2>Cross linking<a class="headerlink" href="#cross-linking" title="Permalink to this heading">&#xB6;</a></h2>
<ul class="simple">
<li>
<p>
<a class="reference internal" href="#Foo::test" title="Foo::test">
<code class="xref php php-meth docutils literal notranslate">
<span class="pre">Foo::test()</span>
</code>
</a>
</p>
</li>
</ul>
</section>
</section>
<div class="clearer"/>
</div>
18 changes: 14 additions & 4 deletions test/unit/method.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
```{eval-rst}
.. php:method:: Foo::simplify()
# Simple method

:::{php:class} Foo
:::

:::{php:method} test($a, ...$args)

Simplify expression.
Simple test method.

:param array $args: Associative array
```{eval-rst}
:param array $args: Associative array
```
:::

## Cross linking

- {php:meth}`Foo::test()`
19 changes: 9 additions & 10 deletions test/unit/ns.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
```{eval-rst}
Simple NS
=========
# Simple NS

.. php:namespace:: Foo
:::{php:namespace} Foo
:::

.. php:class:: A
:::{php:class} A
:::

.. php:method:: simplify()
:::{php:method} simplify()
:::

Cross linking
*************
## Cross linking

* :php:meth:`A::simplify`
```
- {php:meth}`A::simplify`

0 comments on commit 48a3c23

Please sign in to comment.