diff --git a/README.rst b/README.rst
index 0fcacbae..15d0f2e0 100644
--- a/README.rst
+++ b/README.rst
@@ -19,7 +19,9 @@ markdown:
Example Paragraph
- {panel type="example" title="Example Panel"}
+ {panel type="example"}
+
+ # Example Panel
{image file-path="http://placehold.it/350x150" caption="Example Image"}
diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
index 99a4f52d..9d3c693f 100644
--- a/docs/source/changelog.rst
+++ b/docs/source/changelog.rst
@@ -1,6 +1,31 @@
Changelog
#######################################
+0.8.0
+=======================================
+
+- Modify :doc:`processors/interactive` processor for translating text, by required text between start and end tags for whole page interactives.
+- Modify Verto parameters available on creation to allow modification of default required parameters for each processor.
+- Dependency updates:
+
+ - Update ``setuptools`` to 40.2.0.
+ - Update ``sphinx`` to 1.7.7.
+ - Update ``sphinx_rtx_theme`` to 0.4.1.
+
+0.7.4
+=======================================
+
+- Modify :doc:`processors/interactive` processor to use ``slug`` rather than ``name`` to identify interactives
+- Modify :doc:`processors/video` processor template for youtube videos
+- Modify :doc:`processors/boxed-text` processor to have optional type parameter
+- Update style error message to inclue line numbers
+- Dependency updates:
+
+ - Update ``python-slugify`` to 1.2.5.
+ - Update ``setuptools`` to 39.1.0.
+ - Update ``sphinx`` to 1.6.6.
+ - Update ``sphinx_rtx_theme`` to 0.3.0.
+
0.7.3
=======================================
diff --git a/docs/source/processors/interactive.rst b/docs/source/processors/interactive.rst
index 2b331b0a..77ad59d3 100644
--- a/docs/source/processors/interactive.rst
+++ b/docs/source/processors/interactive.rst
@@ -18,13 +18,14 @@ interactive as requested.
You can include an interactive using the following text tag:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_in_page_usage.md
+.. literalinclude:: ../../../verto/tests/assets/interactive-tag/doc_example_in_page_usage.md
:language: none
Required Tag Parameters
***************************************
-- ``name`` - The name to the interactive to include/link to.
+- ``slug`` - The slug to the interactive to include/link to.
+ This slug is added to the list of interactives in ``required_files``.
- ``type`` - Sets the way the interactive is included in the page. Must be set
to one of the following values:
@@ -33,27 +34,33 @@ Required Tag Parameters
page).
- ``whole-page`` - Creates a link to the interactive displayed on a
separate page (this is the preferred method for including an interactive
- on a separate page). The link shows a thumbnail of the interactive with
- text (the text is set using the ``text`` parameter).
+ on a separate page).
+ The link shows a thumbnail of the interactive with text (the text is set using the
+ ``text`` parameter).
By default, the thumbnail should be a ``thumbnail.png`` file found
within the interactive's img folder.
- ``iframe`` - The interactive is included in the page by embedding using
- an iframe. This is used if the interactive is included multiple times on
+ an iframe.
+ This is used if the interactive is included multiple times on
the page to avoid conflicts in JavaScript/CSS.
Optional Tag Parameters
***************************************
-- ``text`` (used with ``whole-page`` value) - Sets the text for the interactive
- link. If no text is given, the link uses the text ``Click to load
- {{ name }}``.
+- ``text`` - Boolean flag to indicate whether the interactive has custom text to dispaly.
+
+ - If given as ``true``, the the subtitle is the first block of text with the interactive block.
+ - This is only use with the ``whole-page`` value.
+ - If no text is given, the link uses the text ``Click to load {{ slug }}``.
+
- ``parameters`` (used with ``whole-page`` and ``iframe`` values) - Adds the parameters
- to interactive link. For example: ``digits=5&start=BBBBB``. Do not include
- the ``?`` at the start, as this is already included in the output.
+ to interactive link.
+ For example: ``digits=5&start=BBBBB``.
+ Do not include the ``?`` at the start, as this is already included in the output.
- ``thumbnail`` (optional - used with ``whole-page`` value) - Displays an
alternative thumbnail for the interactive. When not provided, it defaults to
- ``interactives/interactive-name/img/thumbnail.png``, where ``interactive-name`` is the
- value given for the ``name`` tag parameter (see above).
+ ``interactives/interactive-slug/img/thumbnail.png``, where ``interactive-slug`` is the
+ value given for the ``slug`` tag parameter (see above).
- If the ``thumbnail`` value provided is a relative link (a link that
doesn't start with ``http:``), the link will be rendered with a Django
@@ -86,36 +93,36 @@ Examples
Using the following example tag:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_in_page_usage.md
+.. literalinclude:: ../../../verto/tests/assets/interactive-tag/doc_example_in_page_usage.md
:language: none
The resulting HTML would be:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_in_page_usage_expected.html
+.. literalinclude:: ../../../verto/tests/assets/interactive-tag/doc_example_in_page_usage_expected.html
:language: html
**whole-page example**
Using the following example tag:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_whole_page_usage.md
+.. literalinclude:: ../../../verto/tests/assets/interactive-container/doc_example_whole_page_usage.md
:language: none
The resulting HTML would be:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_whole_page_usage_expected.html
+.. literalinclude:: ../../../verto/tests/assets/interactive-container/doc_example_whole_page_usage_expected.html
:language: html
**iframe example**
Using the following example tag:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_iframe_usage.md
+.. literalinclude:: ../../../verto/tests/assets/interactive-tag/doc_example_iframe_usage.md
:language: none
The resulting HTML would be:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_iframe_usage_expected.html
+.. literalinclude:: ../../../verto/tests/assets/interactive-tag/doc_example_iframe_usage_expected.html
:language: html
Overriding HTML for Interactives
@@ -124,7 +131,7 @@ Overriding HTML for Interactives
When overriding the HTML for interactives, the following Jinja2 placeholders are available:
- ``{{ type }}`` - The type of the interactive.
-- ``{{ name }}`` - The slug name of the interactive to include/link to.
+- ``{{ slug }}`` - The slug of the interactive to include/link to.
- ``{{ text }}`` - The text to to display to a link to a ``whole-page``
interactive.
- ``{{ parameters }}`` - GET parameters to append to the interactive link.
@@ -138,17 +145,17 @@ thumbnail.
For example, providing the following HTML:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_override_html_template.html
+.. literalinclude:: ../../../verto/tests/assets/interactive-container/doc_example_override_html_template.html
:language: css+jinja
with the following tag:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_override_html.md
+.. literalinclude:: ../../../verto/tests/assets/interactive-container/doc_example_override_html.md
:language: none
would result in:
-.. literalinclude:: ../../../verto/tests/assets/interactive/doc_example_override_html_expected.html
+.. literalinclude:: ../../../verto/tests/assets/interactive-container/doc_example_override_html_expected.html
:language: html
diff --git a/docs/source/usage.rst b/docs/source/usage.rst
index d69f5d6f..c215f36b 100644
--- a/docs/source/usage.rst
+++ b/docs/source/usage.rst
@@ -51,6 +51,19 @@ Once the module is imported, you can create a Verto converter creating an Verto
- ``extensions`` - A list of extra Markdown extensions to run in the converter. Details on how to use this parameter can be found on the :doc:`extensions` page.
+- ``custom_argument_rules`` - A dictionary to modify the default argument rules for each tag. The default rules can found by reading the documentation for each tag.
+
+ - *For example:* By default, the ``image-inline`` tag requires alt text to be given, to change this, the following custom argument rules file would be used:
+
+ .. code-block:: python
+
+ {
+ "image-inline": {
+ "alt": false
+ }
+ }
+
+
Step 3: Convert Markdown with converter
=======================================
diff --git a/requirements.txt b/requirements.txt
index 144f6b15..9888d27a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,9 +1,9 @@
# Required dependencies for Verto (installed automatically in setup.py)
markdown==2.6.11
Jinja2==2.10
-python-slugify==1.2.4
-setuptools==38.4.0
+python-slugify==1.2.5
+setuptools==40.2.0
# Required dependencies for building documentation
-sphinx==1.6.6
-sphinx_rtd_theme==0.2.4
+sphinx==1.7.7
+sphinx_rtd_theme==0.4.1
diff --git a/verto/Verto.py b/verto/Verto.py
index 1f572dec..43c9f051 100644
--- a/verto/Verto.py
+++ b/verto/Verto.py
@@ -13,7 +13,8 @@
'image-container',
'image-tag',
'image-inline',
- 'interactive',
+ 'interactive-tag',
+ 'interactive-container',
'panel',
'relative-link',
'save-title',
@@ -29,7 +30,7 @@ class Verto(object):
to HTML.
'''
- def __init__(self, processors=DEFAULT_PROCESSORS, html_templates={}, extensions=[]):
+ def __init__(self, processors=DEFAULT_PROCESSORS, html_templates={}, extensions=[], custom_argument_rules={}):
'''Creates a Verto object.
Args:
@@ -43,10 +44,13 @@ def __init__(self, processors=DEFAULT_PROCESSORS, html_templates={}, extensions=
eg: {'image': ''}
extensions: A list of extra extensions to run on the
markdown package.
+ custom_argument_rules: A dictionary of rules for the processors to
+ override default processor rules.
'''
self.processors = set(processors)
self.html_templates = dict(html_templates)
self.extensions = list(extensions)
+ self.custom_argument_rules = custom_argument_rules
self.create_converter()
def create_converter(self):
@@ -54,7 +58,8 @@ def create_converter(self):
self.verto_extension = VertoExtension(
processors=self.processors,
html_templates=self.html_templates,
- extensions=self.extensions
+ extensions=self.extensions,
+ custom_argument_rules=self.custom_argument_rules,
)
all_extensions = self.extensions + [self.verto_extension]
self.converter = markdown.Markdown(extensions=all_extensions)
diff --git a/verto/VertoExtension.py b/verto/VertoExtension.py
index 9241d422..815cd61e 100644
--- a/verto/VertoExtension.py
+++ b/verto/VertoExtension.py
@@ -6,7 +6,8 @@
from verto.processors.ImageInlinePattern import ImageInlinePattern
from verto.processors.ImageTagBlockProcessor import ImageTagBlockProcessor
from verto.processors.ImageContainerBlockProcessor import ImageContainerBlockProcessor
-from verto.processors.InteractiveBlockProcessor import InteractiveBlockProcessor
+from verto.processors.InteractiveTagBlockProcessor import InteractiveTagBlockProcessor
+from verto.processors.InteractiveContainerBlockProcessor import InteractiveContainerBlockProcessor
from verto.processors.RelativeLinkPattern import RelativeLinkPattern
from verto.processors.RemoveTitlePreprocessor import RemoveTitlePreprocessor
from verto.processors.SaveTitlePreprocessor import SaveTitlePreprocessor
@@ -30,6 +31,8 @@
from verto.utils.overrides import OListProcessor
from verto.utils.overrides import UListProcessor
+from verto.errors.CustomArgumentRulesError import CustomArgumentRulesError
+
from collections import defaultdict, OrderedDict
from os import listdir
import os.path
@@ -46,7 +49,7 @@ class VertoExtension(Extension):
the Verto converter.
'''
- def __init__(self, processors=[], html_templates={}, extensions=[], *args, **kwargs):
+ def __init__(self, processors=[], html_templates={}, extensions=[], custom_argument_rules={}, *args, **kwargs):
'''
Args:
processors: A set of processor names given as strings for which
@@ -61,8 +64,9 @@ def __init__(self, processors=[], html_templates={}, extensions=[], *args, **kwa
'''
super().__init__(*args, **kwargs)
self.jinja_templates = self.loadJinjaTemplates(html_templates)
- self.processor_info = self.loadProcessorInfo()
self.processors = processors
+ self.custom_argument_rules = custom_argument_rules
+ self.processor_info = self.loadProcessorInfo()
self.title = None
self.heading_tree = None
self.custom_slugify = UniqueSlugify()
@@ -144,9 +148,9 @@ def loadJinjaTemplates(self, custom_templates):
'''
templates = {}
env = Environment(
- loader=PackageLoader('verto', 'html-templates'),
- autoescape=select_autoescape(['html'])
- )
+ loader=PackageLoader('verto', 'html-templates'),
+ autoescape=select_autoescape(['html'])
+ )
for file in listdir(os.path.join(os.path.dirname(__file__), 'html-templates')):
html_file = re.search(r'(.*?).html$', file)
if html_file:
@@ -174,7 +178,8 @@ def buildProcessors(self, md, md_globals):
# Markdown overrides
['heading', HeadingBlockProcessor(self, md.parser), '
+
{% autoescape false -%}
{{ text }}
{% endautoescape -%}
diff --git a/verto/html-templates/interactive.html b/verto/html-templates/interactive.html
index dd1f00fa..627a1eea 100644
--- a/verto/html-templates/interactive.html
+++ b/verto/html-templates/interactive.html
@@ -1,14 +1,14 @@
{%- if type == 'in-page' -%}
-{{ "{% include 'interactive/" }}{{ name }}{{ "/index.html' %}" }}
+{{ "{% include 'interactive/" }}{{ slug }}{{ "/index.html' %}" }}
{% elif type == 'iframe' -%}
-
Aenean turpis diam, dictum nec odio ut, porta luctus nunc. Donec vulputate eu magna non finibus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam finibus lectus non lorem consectetur, id sollicitudin est tristique. Nulla in ultricies lectus, nec dapibus ante. Ut ullamcorper orci tincidunt ex mollis rutrum. Nam dapibus diam eu orci laoreet, et egestas quam consectetur. Vestibulum ligula leo, iaculis ac commodo lobortis, posuere ac dui. Aliquam egestas odio congue tempus cursus. Donec dictum dui facilisis enim molestie venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
-
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In fermentum sit amet metus at congue. Fusce nec mauris accumsan, consequat mi ut, scelerisque erat. In hac habitasse platea dictumst. Phasellus maximus semper blandit. Nam consequat justo eget orci ultricies convallis. Praesent tempus sodales ipsum. Suspendisse faucibus quam vitae mollis rutrum. Fusce sit amet lacus sit amet arcu lobortis suscipit a vel nulla.
Mauris vestibulum vestibulum neque a mollis. Curabitur ut urna eleifend urna eleifend mollis. Aliquam malesuada luctus purus, eu maximus elit finibus sed. Ut consectetur tempus tempus. Etiam lacinia at mauris eu sagittis. Donec ante urna, semper id aliquam id.
diff --git a/verto/tests/assets/boxed-text/type_required.md b/verto/tests/assets/boxed-text/type_required.md
new file mode 100644
index 00000000..ccb26844
--- /dev/null
+++ b/verto/tests/assets/boxed-text/type_required.md
@@ -0,0 +1,5 @@
+{boxed-text type="quote"}
+
+This text is a quote.
+
+{boxed-text end}
diff --git a/verto/tests/assets/boxed-text/type_required_expected.html b/verto/tests/assets/boxed-text/type_required_expected.html
new file mode 100644
index 00000000..a1df3c12
--- /dev/null
+++ b/verto/tests/assets/boxed-text/type_required_expected.html
@@ -0,0 +1,3 @@
+
+
This text is a quote.
+
diff --git a/verto/tests/assets/button-link/file_true.md b/verto/tests/assets/button-link/file_true.md
new file mode 100644
index 00000000..e58874d3
--- /dev/null
+++ b/verto/tests/assets/button-link/file_true.md
@@ -0,0 +1,7 @@
+The following interactive has a program that solves the problem for however many cities you want to select by trying out all possible routes, and recording the best so far. You can get a feel for what an intractable problem looks like by seeing how long the interactive takes to solve the problem for different size maps.
+Try generating a map with about 5 cities, and press "Start" to solve the problem.
+
+{button-link link="files/python-example.py" text="Example Code", file="yes"}
+
+Now try it for 10 cities (twice as many). Does it take twice as long? How about twice as many again (20 cities)? What about 50 cities? Can you guess how long it would take?
+You're starting to get a feel for what it means for a problem to be *intractable*.
diff --git a/verto/tests/assets/button-link/file_true_expected.html b/verto/tests/assets/button-link/file_true_expected.html
new file mode 100644
index 00000000..f7de3f7a
--- /dev/null
+++ b/verto/tests/assets/button-link/file_true_expected.html
@@ -0,0 +1,4 @@
+
The following interactive has a program that solves the problem for however many cities you want to select by trying out all possible routes, and recording the best so far. You can get a feel for what an intractable problem looks like by seeing how long the interactive takes to solve the problem for different size maps.
+Try generating a map with about 5 cities, and press "Start" to solve the problem.
Now try it for 10 cities (twice as many). Does it take twice as long? How about twice as many again (20 cities)? What about 50 cities? Can you guess how long it would take?
+You're starting to get a feel for what it means for a problem to be intractable.
diff --git a/verto/tests/assets/button-link/file_true_not_provided.md b/verto/tests/assets/button-link/file_true_not_provided.md
new file mode 100644
index 00000000..228328d4
--- /dev/null
+++ b/verto/tests/assets/button-link/file_true_not_provided.md
@@ -0,0 +1,7 @@
+The following interactive has a program that solves the problem for however many cities you want to select by trying out all possible routes, and recording the best so far. You can get a feel for what an intractable problem looks like by seeing how long the interactive takes to solve the problem for different size maps.
+Try generating a map with about 5 cities, and press "Start" to solve the problem.
+
+{button-link link="http://www.csfieldguide.org.nz/releases/1.9.9/_static/widgets/tract-tsp-basic-v2.html" text="View city trip interactive"}
+
+Now try it for 10 cities (twice as many). Does it take twice as long? How about twice as many again (20 cities)? What about 50 cities? Can you guess how long it would take?
+You're starting to get a feel for what it means for a problem to be *intractable*.
diff --git a/verto/tests/assets/button-link/link_false.md b/verto/tests/assets/button-link/link_false.md
new file mode 100644
index 00000000..82ede019
--- /dev/null
+++ b/verto/tests/assets/button-link/link_false.md
@@ -0,0 +1,3 @@
+You can try out this 3D matrix in the following interactive.
+
+{button-link text="Click for interactive: 3D transform matrix"}
diff --git a/verto/tests/assets/button-link/link_false_expected.html b/verto/tests/assets/button-link/link_false_expected.html
new file mode 100644
index 00000000..d3fc1a8e
--- /dev/null
+++ b/verto/tests/assets/button-link/link_false_expected.html
@@ -0,0 +1,2 @@
+
You can try out this 3D matrix in the following interactive.
+Click for interactive: 3D transform matrix
diff --git a/verto/tests/assets/button-link/text_false.md b/verto/tests/assets/button-link/text_false.md
new file mode 100644
index 00000000..83cfeeef
--- /dev/null
+++ b/verto/tests/assets/button-link/text_false.md
@@ -0,0 +1,7 @@
+The following interactive has a program that solves the problem for however many cities you want to select by trying out all possible routes, and recording the best so far. You can get a feel for what an intractable problem looks like by seeing how long the interactive takes to solve the problem for different size maps.
+Try generating a map with about 5 cities, and press "Start" to solve the problem.
+
+{button-link link="http://www.csfieldguide.org.nz/releases/1.9.9/_static/widgets/tract-tsp-basic-v2.html"}
+
+Now try it for 10 cities (twice as many). Does it take twice as long? How about twice as many again (20 cities)? What about 50 cities? Can you guess how long it would take?
+You're starting to get a feel for what it means for a problem to be *intractable*.
diff --git a/verto/tests/assets/button-link/text_false_expected.html b/verto/tests/assets/button-link/text_false_expected.html
new file mode 100644
index 00000000..724289c8
--- /dev/null
+++ b/verto/tests/assets/button-link/text_false_expected.html
@@ -0,0 +1,4 @@
+
The following interactive has a program that solves the problem for however many cities you want to select by trying out all possible routes, and recording the best so far. You can get a feel for what an intractable problem looks like by seeing how long the interactive takes to solve the problem for different size maps.
+Try generating a map with about 5 cities, and press "Start" to solve the problem.
Now try it for 10 cities (twice as many). Does it take twice as long? How about twice as many again (20 cities)? What about 50 cities? Can you guess how long it would take?
+You're starting to get a feel for what it means for a problem to be intractable.
diff --git a/verto/tests/assets/button-link/text_false_file_true.md b/verto/tests/assets/button-link/text_false_file_true.md
new file mode 100644
index 00000000..9b0c6868
--- /dev/null
+++ b/verto/tests/assets/button-link/text_false_file_true.md
@@ -0,0 +1,6 @@
+The following interactive has a program that solves the problem for however many cities you want to select by trying out all possible routes, and recording the best so far. You can get a feel for what an intractable problem looks like by seeing how long the interactive takes to solve the problem for different size maps.
+Try generating a map with about 5 cities, and press "Start" to solve the problem.
+
+{button-link link="link.html" file="yes"}
+
+Now try it for 10 cities (twice as many). Does it take twice as long? How about twice as many again (20 cities)? What about 50 cities? Can you guess how long it would take?
diff --git a/verto/tests/assets/button-link/text_false_file_true_expected.html b/verto/tests/assets/button-link/text_false_file_true_expected.html
new file mode 100644
index 00000000..caf23058
--- /dev/null
+++ b/verto/tests/assets/button-link/text_false_file_true_expected.html
@@ -0,0 +1,3 @@
+
The following interactive has a program that solves the problem for however many cities you want to select by trying out all possible routes, and recording the best so far. You can get a feel for what an intractable problem looks like by seeing how long the interactive takes to solve the problem for different size maps.
+Try generating a map with about 5 cities, and press "Start" to solve the problem.
Now try it for 10 cities (twice as many). Does it take twice as long? How about twice as many again (20 cities)? What about 50 cities? Can you guess how long it would take?
diff --git a/verto/tests/assets/configuration/all_processors.md b/verto/tests/assets/configuration/all_processors.md
index f73584be..9165b86e 100644
--- a/verto/tests/assets/configuration/all_processors.md
+++ b/verto/tests/assets/configuration/all_processors.md
@@ -18,13 +18,13 @@ This text is the panel's contents.
{panel end}
-{image file-path="http://placehold.it/350x150" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
+{image file-path="http://placehold.it/350x150" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left" alt="This is alt text"}
Dancing with our hands tied.
{image end}
-{image file-path="http://placehold.it/250x50" caption="false" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
+{image file-path="http://placehold.it/250x50" caption="false" source="https://placehold.it/" hover-text="This is hover text" alignment="left" alt="This is alt text"}
{boxed-text}
@@ -46,7 +46,7 @@ It's worth considering which {glossary-link term="algorithm"}algorithms{glossary
{iframe link="https://github.com/"}
-{interactive name="binary-cards" type="iframe" parameters="digits=5&start=BBBBB"}
+{interactive slug="binary-cards" type="iframe" parameters="digits=5&start=BBBBB"}
scratch
when flag clicked
diff --git a/verto/tests/assets/configuration/all_processors_custom_html_expected.html b/verto/tests/assets/configuration/all_processors_custom_html_expected.html
index 36e2992d..41904832 100644
--- a/verto/tests/assets/configuration/all_processors_custom_html_expected.html
+++ b/verto/tests/assets/configuration/all_processors_custom_html_expected.html
@@ -20,7 +20,7 @@
diff --git a/verto/tests/assets/configuration/custom_argument_rules_multiple_tags_error.md b/verto/tests/assets/configuration/custom_argument_rules_multiple_tags_error.md
new file mode 100644
index 00000000..b8d4d162
--- /dev/null
+++ b/verto/tests/assets/configuration/custom_argument_rules_multiple_tags_error.md
@@ -0,0 +1,64 @@
+# Example Title
+
+This is a sentence.
+
+# Example Title 2
+
+{comment This is a comment for other authors to read}
+
+Check out this [resource](resource/134).
+
+{image file-path="http://placehold.it/350x150" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
+
+{panel type="teacher-note"}
+
+# Teacher Note
+
+This text is the panel's contents.
+
+{panel end}
+
+Dancing with our hands tied.
+
+{image end}
+
+{image file-path="http://placehold.it/250x50" caption="false" source="https://placehold.it/" hover-text="This is hover text" alignment="left" alt="This is alt text"}
+
+{boxed-text}
+
+**Computer Science Report for 2.44**
+
+Put your introduction to what bits are here.
+
+{boxed-text end}
+
+{button-link link="http://www.google.com" text="Visit Google"}
+
+{conditional if condition="version == 'teacher'"}
+
+This is text that only teachers should see.
+
+{conditional end}
+
+It's worth considering which {glossary-link term="algorithm"}algorithms{glossary-link end} should be used.
+
+{iframe link="https://github.com/"}
+
+{interactive slug="binary-cards" type="iframe" parameters="digits=5&start=BBBBB"}
+
+ scratch
+ when flag clicked
+ clear
+ forever
+ pen down
+ if < and > then
+ switch costume to [button v]
+ else
+ add (x position) to [list v]
+ end
+ move (foo) steps
+ turn ccw (9) degrees
+
+{table-of-contents}
+
+{video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ"}
diff --git a/verto/tests/assets/configuration/custom_processors_custom_templates_expected.html b/verto/tests/assets/configuration/custom_processors_custom_templates_expected.html
index 4274fac0..2226aeb0 100644
--- a/verto/tests/assets/configuration/custom_processors_custom_templates_expected.html
+++ b/verto/tests/assets/configuration/custom_processors_custom_templates_expected.html
@@ -8,10 +8,10 @@
Teacher Note
Guides for Algorithms
This text is the panel's contents.
{panel end}
-
{image file-path="http://placehold.it/350x150" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
+
{image file-path="http://placehold.it/350x150" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left" alt="This is alt text"}
Dancing with our hands tied.
{image end}
-
+
Computer Science Report for 2.44
Put your introduction to what bits are here.
@@ -21,7 +21,7 @@
Guides for Algorithms
{conditional end}
It's worth considering which {glossary-link term="algorithm"}algorithms{glossary-link end} should be used.
{image file-path="http://placehold.it/250x50" caption="false" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
+
{image file-path="http://placehold.it/250x50" caption="false" source="https://placehold.it/" hover-text="This is hover text" alignment="left" alt="This is alt text"}
{boxed-text}
Computer Science Report for 2.44
Put your introduction to what bits are here.
@@ -27,7 +27,7 @@
Example Title 2
{conditional end}
It's worth considering which {glossary-link term="algorithm"}algorithms{glossary-link end} should be used.
scratch
when flag clicked
clear
diff --git a/verto/tests/assets/configuration/multiline_templates_expected.html b/verto/tests/assets/configuration/multiline_templates_expected.html
index f9034627..5aa68efa 100644
--- a/verto/tests/assets/configuration/multiline_templates_expected.html
+++ b/verto/tests/assets/configuration/multiline_templates_expected.html
@@ -39,7 +39,7 @@
Your browser does not support iframes.
-
+
Your browser does not support iframes.
@@ -47,5 +47,5 @@
{{ table_of_contents }}
-
+
diff --git a/verto/tests/assets/configuration/some_processors.md b/verto/tests/assets/configuration/some_processors.md
index 3b02c4b1..835f559d 100644
--- a/verto/tests/assets/configuration/some_processors.md
+++ b/verto/tests/assets/configuration/some_processors.md
@@ -2,7 +2,7 @@
## This is an H2
-{image file-path="totally-legit-image.png"}
+{image alt="This is alt text" file-path="totally-legit-image.png"}
This is a sentence.
diff --git a/verto/tests/assets/configuration/some_processors_2.md b/verto/tests/assets/configuration/some_processors_2.md
index e4e675b1..5dd5a897 100644
--- a/verto/tests/assets/configuration/some_processors_2.md
+++ b/verto/tests/assets/configuration/some_processors_2.md
@@ -1,6 +1,6 @@
# Another Example Title
-{image file-path="totally-legit-image.png"}
+{image alt="This is alt text" file-path="totally-legit-image.png"}
This is a sentence.
diff --git a/verto/tests/assets/configuration/some_processors_2_expected.html b/verto/tests/assets/configuration/some_processors_2_expected.html
index a5e37f5e..4b530eb2 100644
--- a/verto/tests/assets/configuration/some_processors_2_expected.html
+++ b/verto/tests/assets/configuration/some_processors_2_expected.html
@@ -5,7 +5,7 @@
diff --git a/verto/tests/assets/image-container/align_right.md b/verto/tests/assets/image-container/align_right.md
index 4d997b94..5f126959 100644
--- a/verto/tests/assets/image-container/align_right.md
+++ b/verto/tests/assets/image-container/align_right.md
@@ -1,4 +1,4 @@
-{image caption="true" file-path="computer-studying-turing-test.png" alignment="right"}
+{image caption="true" alt="alt text" file-path="computer-studying-turing-test.png" alignment="right"}
Hey hey hey, look who it is! A caption!
diff --git a/verto/tests/assets/image-container/align_right_expected.html b/verto/tests/assets/image-container/align_right_expected.html
index dfb21c1a..3c8ae5c7 100644
--- a/verto/tests/assets/image-container/align_right_expected.html
+++ b/verto/tests/assets/image-container/align_right_expected.html
@@ -1,4 +1,4 @@
-
+
Hey hey hey, look who it is! A caption!
diff --git a/verto/tests/assets/image-container/align_undefined_error.md b/verto/tests/assets/image-container/align_undefined_error.md
index e9e15de6..70c36826 100644
--- a/verto/tests/assets/image-container/align_undefined_error.md
+++ b/verto/tests/assets/image-container/align_undefined_error.md
@@ -1,4 +1,4 @@
-{image file-path="computer-studying-turing-test.png" alignment="around-about-here" caption="true"}
+{image alt="alt text" file-path="computer-studying-turing-test.png" alignment="around-about-here" caption="true"}
This is the caption.
diff --git a/verto/tests/assets/image-container/alt_false.md b/verto/tests/assets/image-container/alt_false.md
new file mode 100644
index 00000000..d98fe8cb
--- /dev/null
+++ b/verto/tests/assets/image-container/alt_false.md
@@ -0,0 +1,11 @@
+Here's another FSA to consider:
+
+{image file-path="cats.png" caption="true"}
+
+This is a caption.
+
+{image end}
+
+It's fairly clear what it will accept: strings like "ab", "abab", "abababababab", and, of course {math}\epsilon{math end}.
+But there are some missing transitions: if you are in state 1 and get a "b" there's nowhere to go.
+If an input cannot be accepted, it will be rejected, as in this case. We could have put in a trap state to make this clear:
diff --git a/verto/tests/assets/image-container/alt_false_expected.html b/verto/tests/assets/image-container/alt_false_expected.html
new file mode 100644
index 00000000..407dcc1e
--- /dev/null
+++ b/verto/tests/assets/image-container/alt_false_expected.html
@@ -0,0 +1,8 @@
+
Here's another FSA to consider:
+
+
+
This is a caption.
+
+
It's fairly clear what it will accept: strings like "ab", "abab", "abababababab", and, of course {math}\epsilon{math end}.
+But there are some missing transitions: if you are in state 1 and get a "b" there's nowhere to go.
+If an input cannot be accepted, it will be rejected, as in this case. We could have put in a trap state to make this clear:
diff --git a/verto/tests/assets/image-container/alt_false_source_true.md b/verto/tests/assets/image-container/alt_false_source_true.md
new file mode 100644
index 00000000..0f6519a0
--- /dev/null
+++ b/verto/tests/assets/image-container/alt_false_source_true.md
@@ -0,0 +1,11 @@
+Here's another FSA to consider:
+
+{image file-path="cats.png" caption="true" source="source.com"}
+
+This is a caption.
+
+{image end}
+
+It's fairly clear what it will accept: strings like "ab", "abab", "abababababab", and, of course {math}\epsilon{math end}.
+But there are some missing transitions: if you are in state 1 and get a "b" there's nowhere to go.
+If an input cannot be accepted, it will be rejected, as in this case. We could have put in a trap state to make this clear:
diff --git a/verto/tests/assets/image-container/alt_false_source_true_expected.html b/verto/tests/assets/image-container/alt_false_source_true_expected.html
new file mode 100644
index 00000000..09f3c378
--- /dev/null
+++ b/verto/tests/assets/image-container/alt_false_source_true_expected.html
@@ -0,0 +1,9 @@
+
It's fairly clear what it will accept: strings like "ab", "abab", "abababababab", and, of course {math}\epsilon{math end}.
+But there are some missing transitions: if you are in state 1 and get a "b" there's nowhere to go.
+If an input cannot be accepted, it will be rejected, as in this case. We could have put in a trap state to make this clear:
diff --git a/verto/tests/assets/image-container/caption_true_not_provided_numbered_list.md b/verto/tests/assets/image-container/caption_true_not_provided_numbered_list.md
index ecb5bf2e..b89cc604 100644
--- a/verto/tests/assets/image-container/caption_true_not_provided_numbered_list.md
+++ b/verto/tests/assets/image-container/caption_true_not_provided_numbered_list.md
@@ -6,7 +6,7 @@
2. Lorem
- {image file-path="http://placehold.it/350x150" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
+ {image file-path="http://placehold.it/350x150" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left" alt="alt text"}
{image end}
diff --git a/verto/tests/assets/image-container/caption_true_numbered_list_missing_end_tag.md b/verto/tests/assets/image-container/caption_true_numbered_list_missing_end_tag.md
index 3183eb06..e2c2f59e 100644
--- a/verto/tests/assets/image-container/caption_true_numbered_list_missing_end_tag.md
+++ b/verto/tests/assets/image-container/caption_true_numbered_list_missing_end_tag.md
@@ -6,7 +6,7 @@
2. Lorem
- {image file-path="http://placehold.it/350x150" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
+ {image file-path="http://placehold.it/350x150" alt="alt text" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
This is a caption
diff --git a/verto/tests/assets/image-container/contains_caption_expected.html b/verto/tests/assets/image-container/contains_caption_expected.html
index c889960f..e056d598 100644
--- a/verto/tests/assets/image-container/contains_caption_expected.html
+++ b/verto/tests/assets/image-container/contains_caption_expected.html
@@ -1,4 +1,4 @@
diff --git a/verto/tests/assets/image-container/missing_alt_parameter.md b/verto/tests/assets/image-container/missing_alt_parameter.md
new file mode 100644
index 00000000..1c1a7d71
--- /dev/null
+++ b/verto/tests/assets/image-container/missing_alt_parameter.md
@@ -0,0 +1,5 @@
+{image file-path="computer-studying-turing-test.png" caption="true"}
+
+This is the caption text.
+
+{image end}
\ No newline at end of file
diff --git a/verto/tests/assets/image-container/missing_file_path.md b/verto/tests/assets/image-container/missing_file_path.md
new file mode 100644
index 00000000..ec60d734
--- /dev/null
+++ b/verto/tests/assets/image-container/missing_file_path.md
@@ -0,0 +1,5 @@
+Some text before.
+
+{image caption="false" alignment="center"}
+
+Some text after.
diff --git a/verto/tests/assets/image-container/multiple_images_captions_true.md b/verto/tests/assets/image-container/multiple_images_captions_true.md
index 4efba9f4..3921fe4b 100644
--- a/verto/tests/assets/image-container/multiple_images_captions_true.md
+++ b/verto/tests/assets/image-container/multiple_images_captions_true.md
@@ -1,6 +1,6 @@
Imagine we have the following simple black and white image.
-{image file-path="the-first-image.png" caption="true"}
+{image file-path="the-first-image.png" alt="Alt text for an image" caption="true"}
This is the first caption.
diff --git a/verto/tests/assets/image-container/multiple_images_captions_true_expected.html b/verto/tests/assets/image-container/multiple_images_captions_true_expected.html
index 209044bf..243b6e5a 100644
--- a/verto/tests/assets/image-container/multiple_images_captions_true_expected.html
+++ b/verto/tests/assets/image-container/multiple_images_captions_true_expected.html
@@ -1,6 +1,6 @@
Imagine we have the following simple black and white image.
diff --git a/verto/tests/assets/image-tag/align_undefined_error.md b/verto/tests/assets/image-tag/align_undefined_error.md
index d8d24505..7be59d44 100644
--- a/verto/tests/assets/image-tag/align_undefined_error.md
+++ b/verto/tests/assets/image-tag/align_undefined_error.md
@@ -1 +1 @@
-{image file-path="computer-studying-turing-test.png" alignment="around-about-here"}
+{image file-path="computer-studying-turing-test.png" alignment="around-about-here" alt="placeholder image"}
diff --git a/verto/tests/assets/image-tag/alt_false.md b/verto/tests/assets/image-tag/alt_false.md
new file mode 100644
index 00000000..8eb8cc27
--- /dev/null
+++ b/verto/tests/assets/image-tag/alt_false.md
@@ -0,0 +1,5 @@
+Imagine we have the following simple black and white image.
+
+{image file-path="pixel-diamond.png"}
+
+One very simple way a computer can store this image in binary is by using a format where '0' means white and '1' means black (this is a "bit map", because we've mapped the pixels onto the values of bits). Using this method, the above image would be represented in the following way:
diff --git a/verto/tests/assets/image-tag/alt_false_expected.html b/verto/tests/assets/image-tag/alt_false_expected.html
new file mode 100644
index 00000000..255ba843
--- /dev/null
+++ b/verto/tests/assets/image-tag/alt_false_expected.html
@@ -0,0 +1,5 @@
+
Imagine we have the following simple black and white image.
+
+
+
+
One very simple way a computer can store this image in binary is by using a format where '0' means white and '1' means black (this is a "bit map", because we've mapped the pixels onto the values of bits). Using this method, the above image would be represented in the following way:
diff --git a/verto/tests/assets/image-tag/alt_false_source_true.md b/verto/tests/assets/image-tag/alt_false_source_true.md
new file mode 100644
index 00000000..e9171c61
--- /dev/null
+++ b/verto/tests/assets/image-tag/alt_false_source_true.md
@@ -0,0 +1,11 @@
+Here's another FSA to consider:
+
+{image file-path="finite-state-automata-no-trap-example.png" hover-text="hover text is me" source="example.com"}
+
+It's fairly clear what it will accept: strings like "ab", "abab", "abababababab", and, of course {math}\epsilon{math end}.
+But there are some missing transitions: if you are in state 1 and get a "b" there's nowhere to go.
+If an input cannot be accepted, it will be rejected, as in this case. We could have put in a trap state to make this clear:
+
+{image file-path="finite-state-automata-trap-added-example.png" source="example.com" hover-text="also some hover text"}
+
+But things can get out of hand. What if there are more letters in the alphabet? We'd need something like this:
diff --git a/verto/tests/assets/image-tag/alt_false_source_true_expected.html b/verto/tests/assets/image-tag/alt_false_source_true_expected.html
new file mode 100644
index 00000000..03d22a40
--- /dev/null
+++ b/verto/tests/assets/image-tag/alt_false_source_true_expected.html
@@ -0,0 +1,13 @@
+
It's fairly clear what it will accept: strings like "ab", "abab", "abababababab", and, of course {math}\epsilon{math end}.
+But there are some missing transitions: if you are in state 1 and get a "b" there's nowhere to go.
+If an input cannot be accepted, it will be rejected, as in this case. We could have put in a trap state to make this clear:
diff --git a/verto/tests/assets/interactive-container/multiple_interactives_some_text.md b/verto/tests/assets/interactive-container/multiple_interactives_some_text.md
new file mode 100644
index 00000000..c6d3cd9c
--- /dev/null
+++ b/verto/tests/assets/interactive-container/multiple_interactives_some_text.md
@@ -0,0 +1,23 @@
+I'd kiss you as the lights went out
+
+{interactive slug="binary-cards" type="whole-page" parameters="digits=5&start=BBBBB" thumbnail="binarycards.png" text="true"}
+
+Swaying as the room burned down
+
+{interactive end}
+
+I'd hold you as the water rushes in
+
+{interactive slug="arrows" text="false" type="iframe" parameters="digits=5&start=BBBBB"}
+
+I'd kiss you as the lights went out
+
+{interactive slug="flying-boxes" type="in-page"}
+
+I'd hold you as the water rushes in
+
+{interactive slug="binary-cards" type="whole-page" parameters="digits=5&start=BBBBB" thumbnail="binarycards.png"}
+
+I'd kiss you as the lights went out
+
+{interactive slug="binary-cards" type="whole-page" parameters="digits=5&start=BBBBB" thumbnail="binarycards.png" text="false"}
diff --git a/verto/tests/assets/interactive-container/multiple_interactives_some_text_expected.html b/verto/tests/assets/interactive-container/multiple_interactives_some_text_expected.html
new file mode 100644
index 00000000..50a37315
--- /dev/null
+++ b/verto/tests/assets/interactive-container/multiple_interactives_some_text_expected.html
@@ -0,0 +1,14 @@
+
diff --git a/verto/tests/assets/interactive-container/multiple_interactives_text_true.md b/verto/tests/assets/interactive-container/multiple_interactives_text_true.md
new file mode 100644
index 00000000..85b4e749
--- /dev/null
+++ b/verto/tests/assets/interactive-container/multiple_interactives_text_true.md
@@ -0,0 +1,25 @@
+I'd kiss you as the lights went out
+
+{interactive slug="binary-cards" type="whole-page" parameters="digits=5&start=BBBBB" thumbnail="binarycards.png" text="true"}
+
+Swaying as the room burned down
+
+{interactive end}
+
+I'd hold you as the water rushes in
+
+{interactive slug="arrows" text="true" type="whole-page" parameters="digits=5&start=BBBBB"}
+
+If I could dance with you again
+
+{interactive end}
+
+I'd kiss you as the lights went out
+
+{interactive text="true" slug="flying-boxes" type="whole-page"}
+
+Swaying as the room burned down
+
+{interactive end}
+
+I'd hold you as the water rushes in
diff --git a/verto/tests/assets/interactive-container/multiple_interactives_text_true_expected.html b/verto/tests/assets/interactive-container/multiple_interactives_text_true_expected.html
new file mode 100644
index 00000000..4f403584
--- /dev/null
+++ b/verto/tests/assets/interactive-container/multiple_interactives_text_true_expected.html
@@ -0,0 +1,19 @@
+
diff --git a/verto/tests/assets/interactive-container/no_text.md b/verto/tests/assets/interactive-container/no_text.md
new file mode 100644
index 00000000..a11a41da
--- /dev/null
+++ b/verto/tests/assets/interactive-container/no_text.md
@@ -0,0 +1,5 @@
+See you in the dark
+
+{interactive slug="binary-cards" type="whole-page" parameters="digits=5&start=BBBBB"}
+
+All eyes on you my magician
diff --git a/verto/tests/assets/interactive-container/no_text_expected.html b/verto/tests/assets/interactive-container/no_text_expected.html
new file mode 100644
index 00000000..6696871a
--- /dev/null
+++ b/verto/tests/assets/interactive-container/no_text_expected.html
@@ -0,0 +1,3 @@
+
-
diff --git a/verto/tests/assets/panel/contains_inner_image.md b/verto/tests/assets/panel/contains_inner_image.md
index 7fbdcc00..2b53aa02 100644
--- a/verto/tests/assets/panel/contains_inner_image.md
+++ b/verto/tests/assets/panel/contains_inner_image.md
@@ -6,7 +6,7 @@
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non accumsan libero, et suscipit velit. Phasellus quis lorem eget lacus rutrum lobortis. Integer tincidunt convallis arcu a porttitor. Ut urna sapien, egestas mollis lectus a, suscipit placerat ante. Vestibulum id congue tellus. Nullam dapibus felis eu ligula mattis, vel consectetur nibh aliquet. Maecenas nec elit orci. Curabitur ut massa maximus, ultrices diam at, porttitor erat. Praesent eu purus vitae ligula elementum iaculis in non eros. Quisque eu aliquet dolor, ut pharetra lacus.
-{image file-path="http://placehold.it/350x150" caption="true" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
+{image file-path="http://placehold.it/350x150" caption="true" alt="alt text" source="https://placehold.it/" hover-text="This is hover text" alignment="left"}
Placeholder image
diff --git a/verto/tests/assets/panel/contains_inner_image_expected.html b/verto/tests/assets/panel/contains_inner_image_expected.html
index 5b149fb3..8d621ad7 100644
--- a/verto/tests/assets/panel/contains_inner_image_expected.html
+++ b/verto/tests/assets/panel/contains_inner_image_expected.html
@@ -5,7 +5,7 @@
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non accumsan libero, et suscipit velit. Phasellus quis lorem eget lacus rutrum lobortis. Integer tincidunt convallis arcu a porttitor. Ut urna sapien, egestas mollis lectus a, suscipit placerat ante. Vestibulum id congue tellus. Nullam dapibus felis eu ligula mattis, vel consectetur nibh aliquet. Maecenas nec elit orci. Curabitur ut massa maximus, ultrices diam at, porttitor erat. Praesent eu purus vitae ligula elementum iaculis in non eros. Quisque eu aliquet dolor, ut pharetra lacus.
diff --git a/verto/tests/assets/panel/expanded_true.md b/verto/tests/assets/panel/expanded_true.md
new file mode 100644
index 00000000..6f56d7e9
--- /dev/null
+++ b/verto/tests/assets/panel/expanded_true.md
@@ -0,0 +1,9 @@
+{panel type="extra-for-experts" subtitle="true" expanded="always"}
+
+# Lorem ipsum
+
+## Nunc non accumsan
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non accumsan libero, et suscipit velit. Phasellus quis lorem eget lacus rutrum lobortis. Integer tincidunt convallis arcu a porttitor. Ut urna sapien, egestas mollis lectus a, suscipit placerat ante. Vestibulum id congue tellus. Nullam dapibus felis eu ligula mattis, vel consectetur nibh aliquet. Maecenas nec elit orci. Curabitur ut massa maximus, ultrices diam at, porttitor erat. Praesent eu purus vitae ligula elementum iaculis in non eros. Quisque eu aliquet dolor, ut pharetra lacus.
+
+{panel end}
diff --git a/verto/tests/assets/panel/expanded_true_expected.html b/verto/tests/assets/panel/expanded_true_expected.html
new file mode 100644
index 00000000..77d01a3b
--- /dev/null
+++ b/verto/tests/assets/panel/expanded_true_expected.html
@@ -0,0 +1,8 @@
+
+
+Lorem ipsum: Nunc non accumsan
+
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non accumsan libero, et suscipit velit. Phasellus quis lorem eget lacus rutrum lobortis. Integer tincidunt convallis arcu a porttitor. Ut urna sapien, egestas mollis lectus a, suscipit placerat ante. Vestibulum id congue tellus. Nullam dapibus felis eu ligula mattis, vel consectetur nibh aliquet. Maecenas nec elit orci. Curabitur ut massa maximus, ultrices diam at, porttitor erat. Praesent eu purus vitae ligula elementum iaculis in non eros. Quisque eu aliquet dolor, ut pharetra lacus.
+
+
diff --git a/verto/tests/assets/panel/panel_block_missing_whitespace.md b/verto/tests/assets/panel/panel_block_missing_whitespace.md
new file mode 100644
index 00000000..bc921fe2
--- /dev/null
+++ b/verto/tests/assets/panel/panel_block_missing_whitespace.md
@@ -0,0 +1,3 @@
+This is some text.
+{panel}
+Some more text.
diff --git a/verto/tests/assets/panel/subtitle_true.md b/verto/tests/assets/panel/subtitle_true.md
new file mode 100644
index 00000000..68119833
--- /dev/null
+++ b/verto/tests/assets/panel/subtitle_true.md
@@ -0,0 +1,9 @@
+{panel type="note" subtitle="true"}
+
+# Heading
+
+## Subtitle
+
+This panel does have a subtitle!
+
+{panel end}
diff --git a/verto/tests/assets/panel/subtitle_true_expected.html b/verto/tests/assets/panel/subtitle_true_expected.html
new file mode 100644
index 00000000..92b98a7b
--- /dev/null
+++ b/verto/tests/assets/panel/subtitle_true_expected.html
@@ -0,0 +1,8 @@
+
+
+Heading: Subtitle
+
+
+
This panel does have a subtitle!
+
+
diff --git a/verto/tests/assets/panel/subtitle_true_not_provided.md b/verto/tests/assets/panel/subtitle_true_not_provided.md
new file mode 100644
index 00000000..d0f5cf56
--- /dev/null
+++ b/verto/tests/assets/panel/subtitle_true_not_provided.md
@@ -0,0 +1,9 @@
+{panel type="extra-for-experts" expanded="always"}
+
+# Lorem ipsum
+
+## Nunc non accumsan
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non accumsan libero, et suscipit velit. Phasellus quis lorem eget lacus rutrum lobortis. Integer tincidunt convallis arcu a porttitor. Ut urna sapien, egestas mollis lectus a, suscipit placerat ante. Vestibulum id congue tellus. Nullam dapibus felis eu ligula mattis, vel consectetur nibh aliquet. Maecenas nec elit orci. Curabitur ut massa maximus, ultrices diam at, porttitor erat. Praesent eu purus vitae ligula elementum iaculis in non eros. Quisque eu aliquet dolor, ut pharetra lacus.
+
+{panel end}
diff --git a/verto/tests/assets/panel/type_false.md b/verto/tests/assets/panel/type_false.md
new file mode 100644
index 00000000..be6c53b6
--- /dev/null
+++ b/verto/tests/assets/panel/type_false.md
@@ -0,0 +1,7 @@
+{panel type="note" subtitle="false"}
+
+# Heading
+
+This panel does not have a subtitle
+
+{panel end}
diff --git a/verto/tests/assets/panel/type_false_expected.html b/verto/tests/assets/panel/type_false_expected.html
new file mode 100644
index 00000000..fa59321c
--- /dev/null
+++ b/verto/tests/assets/panel/type_false_expected.html
@@ -0,0 +1,8 @@
+
+
+Heading
+
+
+
This panel does not have a subtitle
+
+
diff --git a/verto/tests/assets/smoke/algorithms.md b/verto/tests/assets/smoke/algorithms.md
index a7fd564e..5abe1123 100644
--- a/verto/tests/assets/smoke/algorithms.md
+++ b/verto/tests/assets/smoke/algorithms.md
@@ -8,7 +8,7 @@
Every computer device you have ever used, from your school computers to your calculator, has been using algorithms to tell it how to do whatever it was doing. Algorithms are a very important topic in Computer Science because they help software developers create efficient and error free programs. The most important thing to remember about algorithms is that there can be many different algorithms for the same problem, but some are much better than others!
-{interactive name="sorting-algorithm-comparison" type="in-page"}
+{interactive slug="sorting-algorithm-comparison" type="in-page"}
Computers are incredibly fast at manipulating, moving and looking through data. However the amount of data computers use is often so large that it doesn't matter how fast the computer is, it will take it far too long to examine every single piece of data (companies like Google, Facebook and Twitter routinely process billions of things per day, and in some cases, per minute!) This is where algorithms come in. If a computer is given a better algorithm to process the data then it doesn't matter how much information it has to look through, it will still be able to do it in a reasonable amount of time.
@@ -24,7 +24,7 @@ Often you can get away with describing a process just using some sort of informa
"please get me a glass of water".
A human can understand what this means and can figure out how to accomplish this task by thinking, but a computer would have no idea how to do this!
-{interactive name="high-score-boxes" type="whole-page" text="High Score Boxes"}
+{interactive slug="high-score-boxes" type="whole-page" text="High Score Boxes"}
An example in a computational context might be if you wanted to find a high score in a table of scores:
go through each score keeping track of the largest so far.
@@ -157,13 +157,13 @@ Searching through collections of data is something computers have to do all the
Lets investigate searching with a game...
-{interactive name="searching-algorithms" type="whole-page" text="Searching Boxes - Part 1" parameters="max=2"}
+{interactive slug="searching-algorithms" type="whole-page" text="Searching Boxes - Part 1" parameters="max=2"}
You may have noticed that the numbers on the monsters and pets in the game were in a random order, which meant that finding the pet was basically luck! You might have found it on your first try, or if you were less lucky you might have had to look inside almost all the presents before you found it. This might not seem like such a bad thing since you had enough lives to look under all the boxes, but imagine if there had been 1,000 boxes, or worse 1,000,000! It would have taken far too long to look through all the boxes and the pet might have never been found.
Now this next game is slightly different. You have less lives, which makes things a bit more challenging, but this time the numbers inside the boxes will be in order. The monsters, or maybe the pet, with the smallest number is in the present on the far left, and the one with the largest number is in the present on the far right. Let's see if you can collect all the pets without running out of lives...
-{interactive name="searching-algorithms" type="whole-page" text="Searching Boxes - Part 2" parameters="level=3" thumbnail="thumbnail2.png"}
+{interactive slug="searching-algorithms" type="whole-page" text="Searching Boxes - Part 2" parameters="level=3" thumbnail="thumbnail2.png"}
Now that you have played through the whole game (and hopefully found all of the lost pets!) you may have noticed that even though you had less lives in the second part of the game, and lots of presents to search through, you were still able to find the pet. Why was this possible?
@@ -261,7 +261,7 @@ Use the scales to compare the boxes (you can only compare two boxes at a time) a
If the interactive does not run properly on your computer you can use a set of physical balance scales instead; just make sure you can only tell if one box is heavier than the other, not their exact weight (so not digital scales that show the exact weight).
-{interactive name="sorting-algorithms" type="whole-page" text="Scales interactive"}
+{interactive slug="sorting-algorithms" type="whole-page" text="Scales interactive"}
{comment}
@@ -350,7 +350,7 @@ Insertion and Selection Sort may seem like logical ways to sort things into orde
A much better sorting algorithm is {glossary-link term="quicksort"}Quicksort!{glossary-link end} (the name is a bit of a giveaway)
-{interactive name="sorting-algorithms" type="whole-page" text="Quicksort interactive" parameters="method=quick" thumbnail="thumbnail-quick.png"}
+{interactive slug="sorting-algorithms" type="whole-page" text="Quicksort interactive" parameters="method=quick" thumbnail="thumbnail-quick.png"}
This algorithm is a little more complicated, but is very powerful. To do this algorithm with the sorting interactive, start by randomly choosing a box and placing it on the scales. Now compare every other box to the one you selected; heavier boxes should be put on the right of the second row and lighter boxes are put on the left. When you are done, place the box you were comparing everything else to between these two groups, but to help you keep track of things, put it in the row below. The following example shows how it might look after this step. Note that the selected block is in the right place for the final sorted order, and everything on either side will remain on the side that it is on.
diff --git a/verto/tests/assets/smoke/introduction.md b/verto/tests/assets/smoke/introduction.md
index c2678def..bf2f29b8 100644
--- a/verto/tests/assets/smoke/introduction.md
+++ b/verto/tests/assets/smoke/introduction.md
@@ -45,7 +45,7 @@ They both have the same functionality (they can do the same calculations), but w
(This book has many interactives like this. If the calculators don't work properly, you may need to use a more recent browser. The interactive material in this book works in most recent browsers; Google Chrome is a particularly safe bet.)
-{interactive name="awful-calculator" type="in-page"}
+{interactive slug="awful-calculator" type="in-page"}
The second calculator above is slower, and that can be frustrating.
But it has a fancier interface --- buttons expand when you point to them to highlight what you're doing.
diff --git a/verto/tests/assets/style/doc_example_block_valid_expected.html b/verto/tests/assets/style/doc_example_block_valid_expected.html
new file mode 100644
index 00000000..5e780afa
--- /dev/null
+++ b/verto/tests/assets/style/doc_example_block_valid_expected.html
@@ -0,0 +1,5 @@
+
This is valid.
+
{panel}
+
This is valid.
+
{panel end}
+
This is valid.
diff --git a/verto/tests/assets/style/doc_example_block_valid_in_list_expected.html b/verto/tests/assets/style/doc_example_block_valid_in_list_expected.html
new file mode 100644
index 00000000..070cfbfc
--- /dev/null
+++ b/verto/tests/assets/style/doc_example_block_valid_in_list_expected.html
@@ -0,0 +1,7 @@
+
is an excerpt from Engineering Disaster Episode 13 explaining software flaws in Ariane 5 and Patriot Missiles
diff --git a/verto/tests/assets/video/youtube_embed_link.md b/verto/tests/assets/video/youtube_embed_link.md
index b7605f64..ce5c0d33 100644
--- a/verto/tests/assets/video/youtube_embed_link.md
+++ b/verto/tests/assets/video/youtube_embed_link.md
@@ -1,6 +1,6 @@
## Run Length Encoding
-{video url="https://www.youtube.com/embed/uaV2RuAJTjQ?rel=0"}
+{video url="https://www.youtube.com/embed/uaV2RuAJTjQ"}
Run length encoding (RLE) is a technique that isn't so widely used these days, but it's a great way to get a feel for some of the issues around using compression.
diff --git a/verto/tests/assets/video/youtube_embed_link_expected.html b/verto/tests/assets/video/youtube_embed_link_expected.html
index 151447a8..d846cf76 100644
--- a/verto/tests/assets/video/youtube_embed_link_expected.html
+++ b/verto/tests/assets/video/youtube_embed_link_expected.html
@@ -1,6 +1,6 @@
Run Length Encoding
-
+
Run length encoding (RLE) is a technique that isn't so widely used these days, but it's a great way to get a feel for some of the issues around using compression.
{panel type="teacher-note" summary="Who uses run length encoding?"}
{panel type="teacher-note" summary="TED video introducing the Turing Test"}
There is a TED video that gives an overview of the Turing Test on YouTube
-
+
{panel end}
diff --git a/verto/tests/start_tests.py b/verto/tests/start_tests.py
index eacb1c89..40645002 100644
--- a/verto/tests/start_tests.py
+++ b/verto/tests/start_tests.py
@@ -1,7 +1,8 @@
-import sys, unittest, optparse
+import sys
+import unittest
+import optparse
from verto.tests.ConfigurationTest import ConfigurationTest
from verto.tests.SmokeTests import SmokeFileTest, SmokeDocsTest
-
from verto.tests.BoxedTextTest import BoxedTextTest
from verto.tests.ButtonLinkTest import ButtonLinkTest
from verto.tests.CommentTest import CommentTest
@@ -13,7 +14,8 @@
from verto.tests.ImageTagTest import ImageTagTest
from verto.tests.ImageContainerTest import ImageContainerTest
from verto.tests.JinjaTest import JinjaTest
-from verto.tests.InteractiveTest import InteractiveTest
+from verto.tests.InteractiveTagTest import InteractiveTagTest
+from verto.tests.InteractiveContainerTest import InteractiveContainerTest
from verto.tests.PanelTest import PanelTest
from verto.tests.RelativeLinkTest import RelativeLinkTest
from verto.tests.RemoveTest import RemoveTest
@@ -24,7 +26,6 @@
from verto.tests.StyleTest import StyleTest
from verto.tests.TableOfContentsTest import TableOfContentsTest
from verto.tests.VideoTest import VideoTest
-
from verto.tests.HtmlParserTest import HtmlParserTest
from verto.tests.MarkdownOverrideTest import MarkdownOverrideTest
@@ -34,15 +35,31 @@ def parse_args():
useful for developing when parts of verto are known to fail.
'''
opts = optparse.OptionParser(
- usage='Run the command `python -m verto.tests.start_tests` from the level above the verto directory.', description='Verifies that Verto is functional compared to the testing suite.')
- opts.add_option('--travis',
- action='store_true', help='Enables skipping suites on failure. To be used by continuous integration system.', default=False)
- opts.add_option('--no_smoke',
- action='store_true', help='Skips smoke tests, should be used for local development only.', default=False)
- opts.add_option('--no_system',
- action='store_true', help='Skips system tests, should be used for local development only.', default=False)
- opts.add_option('--no_unit',
- action='store_true', help='Skips unit tests, should be used for local development only.', default=False)
+ usage='Run the command `python -m verto.tests.start_tests` from the level above the verto directory.',
+ description='Verifies that Verto is functional compared to the testing suite.')
+ opts.add_option(
+ '--travis',
+ action='store_true',
+ help='Enables skipping suites on failure. To be used by continuous integration system.',
+ default=False
+ )
+ opts.add_option(
+ '--no_smoke',
+ action='store_true',
+ help='Skips smoke tests, should be used for local development only.',
+ default=False
+ )
+ opts.add_option(
+ '--no_system',
+ action='store_true', help='Skips system tests, should be used for local development only.',
+ default=False
+ )
+ opts.add_option(
+ '--no_unit',
+ action='store_true',
+ help='Skips unit tests, should be used for local development only.',
+ default=False
+ )
options, arguments = opts.parse_args()
return options, arguments
@@ -79,7 +96,8 @@ def unit_suite():
unittest.makeSuite(ImageInlineTest),
unittest.makeSuite(ImageTagTest),
unittest.makeSuite(ImageContainerTest),
- unittest.makeSuite(InteractiveTest),
+ unittest.makeSuite(InteractiveTagTest),
+ unittest.makeSuite(InteractiveContainerTest),
unittest.makeSuite(JinjaTest),
unittest.makeSuite(PanelTest),
unittest.makeSuite(SaveTitleTest),