[docutils:feature-requests] #112 The the include directive does not allow configuring a parser
Günter Milde via Docutils-develop <[email protected]> Mon, 14 Apr 2025 10:04:08 -0000
| Newsgroups | gmane.text.docutils.devel |
|---|---|
| Message-ID | </p/docutils/feature-requests/112/3cce2cf282fd98407277698d2f9c140cd808eb43.feature-requests@docutils.p.sourceforge.net> |
- **status**: open --> pending-works-for-me - **Group**: --> Default - **Comment**: I don't fully understand the request of the upstream bug report, however it seems to regard documents parsed by the 3rd party parser MyST which is one of the available "markdown" parsers. The directives described in https://docutils.sourceforge.io/docs/ref/rst/directives.html are specific to Docutil's reStructuredText parser. The [reStructuredText "include" directive](https://docutils.sourceforge.io/docs/ref/rst/directives.html#include) provides the option "parser" to select a parser module for the to-be-included file. This is intended to enable the inclusion of files in different markup languages (reStructuredText, markdown, XML). 3rd-party parsers can provide configuration settings that enable document-wide configuration via the the [Docutils Configuration](https://docutils.sourceforge.io/docs/user/config.html) system. Configuring the parser modules on a per-inclusion level is not possible (an application may subclass and configure a parser in an importable Python module). When using docutils programmatically to convert a file or string, the parser class can be passed as pre-configured Python object (see [The Docutils Publisher](https://docutils.sourceforge.io/docs/api/publisher.html). The MyST parser also provides an "include" directive. However, according to its documentation, without the "parser" option. https://mystmd.org/guide/directives#directive-include --- **[feature-requests:#112] The the include directive does not allow configuring a parser** **Status:** pending-works-for-me **Group:** Default **Created:** Sat Apr 05, 2025 03:14 PM UTC by Gabriel P **Last Updated:** Mon Apr 14, 2025 09:21 AM UTC **Owner:** nobody See this bug report: https://github.com/executablebooks/MyST-NB/issues/471 Is there a way to configure the parser when using include? I checked here but could not see anything that might help: https://docutils.sourceforge.io/docs/ref/rst/directives.html#include --- Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.