From f30e152d46f299250cb85b2e59c7d200f55f3860 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sun, 13 Nov 2016 18:33:56 -0500 Subject: [PATCH] docs: include text samples automatically --- docs/text_feature.rst | 50 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/docs/text_feature.rst b/docs/text_feature.rst index f5b2d09..a2870c5 100644 --- a/docs/text_feature.rst +++ b/docs/text_feature.rst @@ -69,18 +69,48 @@ Markup See :ref:`Markup ` in :doc:`/dsl/text`. -Examples --------- +Samples +------- - * Examples of all of the above are crammed into the ``text_options.rb`` sample `found here `_ - * The ``embed_text.rb`` sample has more examples of embedding text, which can be `found here `_ - * The ``config_text_markup.rb`` sample demonstrates how quoting can be configured, `found here `_ +These samples are maintained in the `repository here `_ in case you need some of the assets referenced. -And this one too: +Sample: _text.rb +^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../samples/text/_text.rb + :language: ruby + :linenos: .. raw:: html - - - - + + +Sample: text_options.rb +^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../samples/text_options.rb + :language: ruby + :linenos: + +Sample: embed_text.rb +^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../samples/embed_text.rb + :language: ruby + :linenos: + + +Sample: config_text_markup.rb +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../samples/config_text_markup.rb + :language: ruby + :linenos: + +.. literalinclude:: ../samples/config_text_markup.yml + :language: ruby + :linenos: + +.. literalinclude:: ../samples/config_disable_quote.yml + :language: ruby + :linenos: