symfony-tools/docs-builder

Minor issue in the parsing of code blocks with automatic PHP highlighting

javiereguiluz opened this issue · 3 comments

In EasyAdmin docs we have the following in https://github.com/EasyCorp/EasyAdminBundle/blob/master/doc/fields.rst

Design Options
~~~~~~~~~~~~~~

::

    TextField::new('firstName', 'Name')
        // CSS class/classes are applied to the field contents (in the 'index' page)
        // or to the row that wraps the contents (in the 'detail', 'edit' and 'new' pages)

        // use this method to add new classes to the ones applied by EasyAdmin
        ->addCssClass('text-large text-bold')
        // use this other method if you want to remove any CSS class added by EasyAdmin
        ->setCssClass('text-large text-bold')

        // this defines the Twig template used to render this field in 'index' and 'detail' pages
        // (this is not used in the 'edit'/'new' pages because they use Symfony Forms themes)
        ->setTemplatePath('admin/fields/my_template.html.twig')

        // only applied to 'index' page. Useful for example to right-align numbers
        ->setTextAlign('right')

Formatting Options
~~~~~~~~~~~~~~~~~~

[...]

In current symfony.com it's correctly displayed as a code block:

image

However, docs-builder parses it as a blockquote (don't mind the design of the new doc, it's still unstyled):

image

Fyi: To learn a bit about the new parser, I'm going to try to work on this issue.

Will be fixed by doctrine/rst-parser#134

Closing - looks like we got the PR merged.