Adding "Foo implements Bar;" declarations in ReSpec IDL

Two questions:

1. What's the right way to do this? 
2. Shouldn't ReSpec only try to parse dl[class="idl"] instead of *[class="idl"] ?


Since ReSpec does not support things like declarations outside the interface block…

	partial interface Foo {
	};
	Foo implements Bar;


…I attempted inserted a preformatted block.

	<pre class="idl"><span class="idlInterface" id="idl-def-Foo">partial interface <span class="idlInterfaceID">Foo</span> {
	};
	<span class="idlInterfaceID">Foo</span> implements <span class="idlInterfaceID">Bar</span>;</span></pre>


Unfortunately, ReSpec chokes on the "idl" classname. I need the 'idl' classname for the styles, so I tried using a ReSpec formatter. 

	<script class="remove">
	function preformattedIDL(r, content) {
		return '<pre class="idl">' +content+ '</pre>';
	};
	</script>
	<div data-transform="preformattedIDL"><span class="idlInterface" id="idl-def-Foo">partial interface <span class="idlInterfaceID">Foo</span> {
	};
	<span class="idlInterfaceID">Foo</span> implements <span class="idlInterfaceID">Bar</span>;</span></div>


This inserts the node correctly, so it gets the WebIDL block and inline styles, but ReSpec then tries to parse the newly inserted contents and chokes again on the 'idl' classname.


Thanks in advance.
James

Received on Friday, 7 December 2012 06:00:51 UTC