ddoc patterns

spir denis.spir at gmail.com
Thu Apr 7 10:27:52 PDT 2011


On 04/07/2011 03:32 PM, Jacob Carlborg wrote:
> On 2011-04-07 12:25, spir wrote:
>> On 04/07/2011 10:20 AM, spir wrote:
>>> Hello,
>>>
>>> In D stdlib's ddoc the idiom "$(D some d code) is constantly used. But
>>> it does
>>> not work by me. Not only it's not interpreted, but the contents are
>>> stripped
>>> out all together. (A *very* big bug of ddoc.)
>>> First, I'd like to know why.
>>> Second, there is another pattern $(D_CODE some d code), but it place
>>> the code
>>> on a separate block. Is this intended?
>>> Third, http://www.digitalmars.com/d/2.0/ddoc.html seems to imply one
>>> can define
>>> new patterns. How to do that? I tried following the example, but my
>>> code ends
>>> up interpreted and stripped out.
>>
>> OK found it: pattern defs must be places under a "Macro:" section title.
>>
>> I take the opprtunity to ask another question: does anyone know how to
>> tag a *span* of text as literal/uninterpreted (either in html or css).
>> The issue is <pre> makes a *block*, even if not inside a <div> or <p>; I
>> desperately need the same feature for inline pieces of code.
>>
>> Denis
>
> Have a look at the CSS display property:
> http://w3schools.com/css/pr_class_display.asp

Great, does the trick!
But is there else really no other way to suspend interpretation as <pre>? I 
find this strange... how are we supposed to insert "code phrases" in the flow 
of normal text?

Denis
-- 
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d-learn mailing list