diff --git a/converter/rst/avembed.py b/converter/rst/avembed.py index 77cfad27..91b3ed5c 100644 --- a/converter/rst/avembed.py +++ b/converter/rst/avembed.py @@ -44,8 +44,8 @@ def _avembed(self, matchobj): f'?selfLoggingEnabled=false&localMode=true&JXOP-debug=true&JOP-lang=en&JXOP-code=java' \ f'&scoringServerEnabled=false&threshold=5&points=1.0&required=True" ' \ f'class="embeddedExercise" width="{iframe_width}" height="{iframe_height}"' \ - f' data-showhide="show" scrolling="yes" ' \ - f'style="position: relative; top: 0px;">Your browser does not support iframes.' \ + f' data-showhide="show" scrolling="no" ' \ + f'style="position: relative; top: 0px; border: none;">Your browser does not support iframes.' \ f'{caret_token}{caret_token}{{Check It!|assessment}}({assessment_id}){caret_token}{caret_token}\n' @staticmethod diff --git a/converter/rst/code_include.py b/converter/rst/code_include.py index fb4e5558..9eae597a 100644 --- a/converter/rst/code_include.py +++ b/converter/rst/code_include.py @@ -35,7 +35,10 @@ def _code_include(self, matchobj): caret_token = self._caret_token opt = matchobj.group('options') tag = self._get_tag_by_opt(opt) if opt else None - for file_path in self._get_file_paths(matchobj): + file_paths = self._get_file_paths(matchobj) + if file_paths is None: + return + for file_path in file_paths: index = file_path.parts.index(self.source_code_dir) self._source_code_paths.append('/'.join(file_path.parts[index+1:])) try: diff --git a/converter/rst/image.py b/converter/rst/image.py index 4bb6ff6b..d27d1e93 100644 --- a/converter/rst/image.py +++ b/converter/rst/image.py @@ -31,7 +31,6 @@ def _get_image_options(raw_options): def _image(self, matchobj): caret_token = self._caret_token image_path = matchobj.group('path') - image_path = f'{self._open_dsa_cdn}/{image_path}' output = MASK_IMAGE_TO_MD.replace('{image}', image_path) output = self._set_alt(output, matchobj.group('options')) figure_number = matchobj.group('figure_number') if matchobj.group('figure_number') is not None else '' diff --git a/converter/rst2markdown.py b/converter/rst2markdown.py index 1f3e1c0a..cf64393f 100644 --- a/converter/rst2markdown.py +++ b/converter/rst2markdown.py @@ -34,7 +34,7 @@ from converter.rst.preparer_math_block import PreparerMathBlock from converter.rst.character import Character -OPEN_DSA_CDN = 'https://global.codio.com/opendsa/v5' +OPEN_DSA_CDN = 'https://global.codio.com/opendsa/v6' class Rst2Markdown(object): diff --git a/tests/unit/cases_rst/avembed.md b/tests/unit/cases_rst/avembed.md index 11e65a93..a7343999 100644 --- a/tests/unit/cases_rst/avembed.md +++ b/tests/unit/cases_rst/avembed.md @@ -1,13 +1,13 @@ Each '0' bit indicates a left branch while each '1' bit indicates a right branch. The following slideshow shows an example for how to decode a message by traversing the tree appropriately. - +
Figure 0.0.1

- + {Check It!|assessment}(custom-huffmandecodepro) @@ -22,16 +22,16 @@ In theory, Huffman coding is an optimal coding method whenever the true frequenc -![Mid-square method example](https://global.codio.com/opendsa/v5/Images/MidSquare.png) +![Mid-square method example](Images/MidSquare.png) - + {Check It!|assessment}(custom-midsquare) - + {Check It!|assessment}(custom-midsquare1) diff --git a/tests/unit/cases_rst/image.md b/tests/unit/cases_rst/image.md index cb4ae1af..a376c35c 100644 --- a/tests/unit/cases_rst/image.md +++ b/tests/unit/cases_rst/image.md @@ -1,4 +1,4 @@ -![Dynamic "left-child/right-sibling" representation](https://global.codio.com/opendsa/v5/Images/GenBin.png) +![Dynamic "left-child/right-sibling" representation](Images/GenBin.png) **Figure 0.0.1:** *A general tree converted to the dynamic "left-child/right-sibling" representation.* diff --git a/tests/unit/cases_rst/inlineav.md b/tests/unit/cases_rst/inlineav.md index 4c7a320c..bff404ba 100644 --- a/tests/unit/cases_rst/inlineav.md +++ b/tests/unit/cases_rst/inlineav.md @@ -1,5 +1,5 @@ - +
Figure 0.0.1:

diff --git a/tests/unit/cases_rst/sidebar.md b/tests/unit/cases_rst/sidebar.md index af5cafd6..26b43a0b 100644 --- a/tests/unit/cases_rst/sidebar.md +++ b/tests/unit/cases_rst/sidebar.md @@ -3,7 +3,7 @@ **Portrait of Carl Gauss** -![**Figure 0.0.1:** *Carl Friedrich Gauss by G. Biermann (1824-1908)*](https://global.codio.com/opendsa/v5/Images/Carl_Friedrich_Gauss.jpg) +![**Figure 0.0.1:** *Carl Friedrich Gauss by G. Biermann (1824-1908)*](Images/Carl_Friedrich_Gauss.jpg) **Figure 0.0.1:** *Carl Friedrich Gauss by G. Biermann (1824-1908)* diff --git a/tests/unit/test_render_rst.py b/tests/unit/test_render_rst.py index 47763b44..6eb1ad4e 100644 --- a/tests/unit/test_render_rst.py +++ b/tests/unit/test_render_rst.py @@ -81,7 +81,7 @@ def test_bibliography_render(self): self.run_case('bibliography') def test_code_include_render(self): - self.run_case('code_include', pathlib.Path.cwd().joinpath('./tests/unit/cases_rst')) + self.run_case('code_include', pathlib.Path.cwd().joinpath('./cases_rst')) def test_glossary_render(self): self.run_case('glossary')