@bnmnetp I'm getting some strange behavior out of self.state.nested_parse() when the directive has content that isn't composed solely out of other directives (i.e. text). The content is getting parsed twice--for example, in the RST
.. clickablearea:: click1 :question: Click on all assignment statements. :feedback: Remember, the operator '=' is used for assignment. :click-incorrect:def main()::endclick: :click-correct:x = 4:endclick: for i in range(5): :click-correct:y = i:endclick: :click-incorrect:if y > 2::endclick: print(y)
, the code block starting with :click-incorrect: is getting rendered once normally, then once again after the full component has been rendered like this:
<dl class="docutils"> <dt>:click-incorrect:def main()::endclick:</dt> <dd><p class="first">:click-correct:x = 4:endclick: for i in range(5):</p> <blockquote class="last"> <div><p>:click-correct:y = i:endclick: :click-incorrect:if y > 2::endclick:</p> <blockquote> <div>print(y)</div></blockquote> </div></blockquote> </dd> </dl>
Do you know why this is happening? It's a big roadblock and I'm unsure of what to do about it.
$(...).method() is not a functionwhere
methodis any number of different methods. I'll try a couple other methods and see if anything works.
<pre data-component="parsons" id="question1_100_4"> <span data-question>sc-1-3: Construct a block of code that correctly implements the accumulator pattern.</span>x = 0 for i in range(10) x = x + 1</pre>
if (x in [‘java’, ‘cpp’…])in the first place.