Skip to content

Commit ad72ec9

Browse files
WalterBrightwilzbach
authored andcommitted
add URL recognition to Ddoc spec
1 parent dfc3310 commit ad72ec9

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

spec/ddoc.dd

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ a line immediately followed by a ':'. This name forms the section name.
202202
The section name is not case sensitive.
203203
)
204204

205+
$(P
206+
Section names starting with 'http://' or 'https://' are not recognized as section names.
207+
)
208+
205209
$(H4 $(LNAME2 summary, Summary))
206210

207211
$(P
@@ -542,12 +546,23 @@ Identifiers in documentation comments that are function parameters or are
542546
names that are in scope at the associated declaration are emphasized in
543547
the output.
544548
This emphasis can take the form of italics, boldface, a hyperlink, etc.
545-
How it is emphasized depends on what it is - a function parameter, type,
549+
How it is emphasized depends on what it is — a function parameter, type,
546550
D keyword, etc.
547551
To prevent unintended emphasis of an identifier, it can be preceded by
548552
an underscore ($(UNDERSCORE)). The underscore will be stripped from the output.
549553
)
550554

555+
$(H3 $(LNAME2 urls, URLs))
556+
557+
$(P
558+
URLs are sequences of characters starting with 'http://' or 'https://',
559+
continue with one or more characters from the set of letters, digits and
560+
'-_?=%&/+#~.', and contain at least one '.'.
561+
URL recognition happens before all macro text substitution.
562+
The URL is wrapped with a `$(DOLLAR)(LINK)` macro.
563+
The $(LINK2 #emphasis, underscore prefix processing) is not done for URL text.
564+
)
565+
551566
$(H3 $(LNAME2 character_entities, Character Entities))
552567

553568
$(P

0 commit comments

Comments
 (0)