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 sphinx.parsers.Parser class; a base class for new parsers #2207

Merged
merged 2 commits into from Jan 17, 2016

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Dec 31, 2015

Since 1.3, Sphinx supports additional parsers.
But, it accepts docutils parsers simply. So the parsers could not read any configurations and environments. I can not even call warn() to show error messages.

To improve that situation, I would like to add sphinx.parsers.Parser as a base class for Sphinx parsers.
The class inherits docutils.parsers.Parser and implements set_application() in addition.
It enables subclasses to read configurations, to access environments and to logging.

@tk0miya tk0miya added extensions type:enhancement enhance or introduce a new feature labels Dec 31, 2015
@birkenfeld
Copy link
Member

+1

Might need some documentation updates?

@tk0miya
Copy link
Member Author

tk0miya commented Jan 2, 2016

Thank you for comment. I updated docs.
Can I merge this into master?


A Base class for additional parsers.

:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
Copy link
Member

Choose a reason for hiding this comment

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

2015 -> 2016

@shimizukawa
Copy link
Member

+1 with nits.

@shimizukawa shimizukawa added this to the 1.4 milestone Jan 17, 2016
tk0miya added a commit that referenced this pull request Jan 17, 2016
Add sphinx.parsers.Parser class; a base class for new parsers
@tk0miya tk0miya merged commit cf5e138 into sphinx-doc:master Jan 17, 2016
The class inherits ``docutils.parsers.Parser`` and implements ``set_application()`` in addition.
It enables subclasses to read configurations, to access environments and to logging.
@tk0miya
Copy link
Member Author

tk0miya commented Jan 17, 2016

Thank you for reviewing. I merged it.

tk0miya added a commit that referenced this pull request Jan 17, 2016
@tk0miya tk0miya deleted the baseclass_for_parsers branch January 17, 2016 10:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants