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 support for checking examples in rst documentations #1

Merged
merged 1 commit into from
May 29, 2016

Conversation

agallou
Copy link
Contributor

@agallou agallou commented May 25, 2016

tested on atoum/atoum-documentation#209
Rusty allowed us to find some errors. Thanks.

{
$parser = new Parser();

$parser->getEnvironment()->setErrorManager(new class() extends ErrorManager {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to do that? Is it going to silence parse errors in the document?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because some directives are not supported by the parser (we only need the code example directives). And when it appends an ugly echo is made : https://github.com/Gregwar/RST/blob/master/ErrorManager.php#L19. This anonymous class prevents that.

@K-Phoen
Copy link
Owner

K-Phoen commented May 26, 2016

Awesome, thanks for this PR! 👍

@K-Phoen K-Phoen merged commit d466089 into K-Phoen:master May 29, 2016
@K-Phoen
Copy link
Owner

K-Phoen commented May 29, 2016

Merged, thanks :)

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