Skip to content
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

Add 'code' as alternative to 'code-block'. #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

terrencegf
Copy link

I have seen several RST markdown files where 'code::' is used instead of 'code-block::'. This causes the library to throw an error about 'unknown directive'. So simply copy Directives/CodeBlock.php to Directives/Code.php and add Directives\Code to Kernel.php to allow ignorant users to use 'code:'', even if it is incorrect.

…n error occurs. So simply allow 'code' as valid markdown which identical functionality to 'code-block'.
@toastal
Copy link

toastal commented Dec 14, 2024

to allow ignorant users to use 'code:'', even if it is incorrect.

https://docutils.sourceforge.io/docs/ref/rst/directives.html#code

Official docs use .. code::

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants