Styleguide should have code in the part that can be copied

Bug #1619474 reported by Kristina Hoeppner on 2016-09-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Pat

Bug Description

Currently, the styleguide displays the code that needs to be copied without the actual code bits for language strings, URLs etc., which makes copying more difficult because the copied code needs to be cleaned up.

Reviewed: https://reviews.mahara.org/6914
Committed: https://git.mahara.org/mahara/mahara/commit/f61bf0b8f0aa0a73c5c247a695e853b00cb7b155
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit f61bf0b8f0aa0a73c5c247a695e853b00cb7b155
Author: Aaron Wells <email address hidden>
Date: Fri Sep 2 13:08:07 2016 +1200

Bug 1619474: Display Dwoo tags in styleguide code samples

This patch adds a Dwoo precompiler on styleguide.php.
It locates all the code samples (as delimited by markup
"```" delimiters), and makes two copies of each one.
One is passed on to Dwoo to be compiled and rendered,
and the other is surrounded with ```{literal}{/literal}```
so that the Dwoo tags in it will remain uncompiled,
and the markdown renderer can render it into code.

We were previously doing this on the JS side, but then
the rendered examples couldn't properly render
Dwoo tags in the examples.

behatnotneeded - guide only no core functionality

Change-Id: Ic55a972437d1c2c8f88169d501a48735b8fd303b

Robert Lyon (robertl-9) wrote :

We can use smarty tags in the style template now and it will show the tags un-parsed in the code snippets

Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 17.04.0
Robert Lyon (robertl-9) on 2017-04-27
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers