-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1182 from phpDocumentor/backport/1.x/pr-1179
[1.x] Merge pull request #1179 from phpDocumentor/feature/tables-to-rst
- Loading branch information
Showing
11 changed files
with
203 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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
2 changes: 2 additions & 0 deletions
2
packages/guides-theme-rst/resources/template/rst/body/table.rst.twig
This file contains 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,2 @@ | ||
|
||
{{ renderRstTable(node) | raw }} |
This file contains 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 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
56 changes: 56 additions & 0 deletions
56
tests/Integration/tests-full/md-to-rst/table-md-to-rst/expected/index.rst
This file contains 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,56 @@ | ||
=============== | ||
Markdown Tables | ||
=============== | ||
|
||
Simple Table | ||
============ | ||
|
||
+------------+-----+---------------+ | ||
| Name | Age | City | | ||
+============+=====+===============+ | ||
| John Doe | 29 | New York | | ||
+------------+-----+---------------+ | ||
| Jane Smith | 34 | San Francisco | | ||
+------------+-----+---------------+ | ||
| Sam Green | 22 | Boston | | ||
+------------+-----+---------------+ | ||
|
||
Table 1 | ||
======= | ||
|
||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
| Method name | Description | Parameters | Default | | ||
+==============================================+===================================================================================================================================================================+=======================================================+============================================================================================+ | ||
| `setIcon` | icon file, or existing icon identifier | `string $icon` | `'EXT:container/Resources/Public/Icons/Extension.svg'` | | ||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
| `setBackendTemplate` | Template for backend view | `string $backendTemplate` | `null'` | | ||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
| `setGridTemplate` | Template for grid | `string $gridTemplate` | `'EXT:container/Resources/Private/Templates/Container.html'` | | ||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
| `setGridPartialPaths` / `addGridPartialPath` | Partial root paths for grid | `array $gridPartialPaths` / `string $gridPartialPath` | `['EXT:backend/Resources/Private/Partials/', 'EXT:container/Resources/Private/Partials/']` | | ||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
| `setGridLayoutPaths` | Layout root paths for grid | `array $gridLayoutPaths` | `[]` | | ||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
| `setSaveAndCloseInNewContentElementWizard` | saveAndClose for new content element wizard | `bool $saveAndCloseInNewContentElementWizard` | `true` | | ||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
| `setRegisterInNewContentElementWizard` | register in new content element wizard | `bool $registerInNewContentElementWizard` | `true` | | ||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
| `setGroup` | Custom Group (used as optgroup for CType select, and as tab in New Content Element Wizard). If empty "container" is used as tab and no optgroup in CType is used. | `string $group` | `'container'` | | ||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
| `setDefaultValues` | Default values for the newContentElement.wizardItems | `array $defaultValues` | `[]` | | ||
+----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------------------------------+ | ||
|
||
Table 2 | ||
======= | ||
|
||
+-----------------------------+---------------------------------------------------------------------------------------------------------+------------------------------------------------------------+-----------+ | ||
| Option | Description | Default | Parameter | | ||
+=============================+=========================================================================================================+============================================================+===========+ | ||
| `contentId` | id of container to to process | current uid of content element `$cObj->data['uid']` | `?int` | | ||
+-----------------------------+---------------------------------------------------------------------------------------------------------+------------------------------------------------------------+-----------+ | ||
| `colPos` | colPos of children to to process | empty, all children are processed (as `children_<colPos>`) | `?int` | | ||
+-----------------------------+---------------------------------------------------------------------------------------------------------+------------------------------------------------------------+-----------+ | ||
| `as` | variable to use for proceesedData (only if `colPos` is set) | `children` | `?string` | | ||
+-----------------------------+---------------------------------------------------------------------------------------------------------+------------------------------------------------------------+-----------+ | ||
| `skipRenderingChildContent` | do not call `ContentObjectRenderer->render()` for children, (`renderedContent` in child will not exist) | empty | `?int` | | ||
+-----------------------------+---------------------------------------------------------------------------------------------------------+------------------------------------------------------------+-----------+ |
11 changes: 11 additions & 0 deletions
11
tests/Integration/tests-full/md-to-rst/table-md-to-rst/input/guides.xml
This file contains 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,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<guides xmlns="https://www.phpdoc.org/guides" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://www.phpdoc.org/guides packages/guides-cli/resources/schema/guides.xsd" | ||
input-format="md" | ||
theme="rst" | ||
> | ||
<project title="Project Title" version="6.4"/> | ||
<extension class="phpDocumentor\Guides\RstTheme"/> | ||
<output-format>rst</output-format> | ||
</guides> |
Oops, something went wrong.