Skip to content

Commit 75039cf

Browse files
authored
Merge pull request #1858 from WalterBright/Ddoc-URL
add URL recognition to Ddoc spec
2 parents 7da1a03 + 43095ef commit 75039cf

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
@@ -204,6 +204,10 @@ a line immediately followed by a ':'. This name forms the section name.
204204
The section name is not case sensitive.
205205
)
206206

207+
$(P
208+
Section names starting with 'http://' or 'https://' are not recognized as section names.
209+
)
210+
207211
$(H4 $(LNAME2 summary, Summary))
208212

209213
$(P
@@ -544,12 +548,23 @@ Identifiers in documentation comments that are function parameters or are
544548
names that are in scope at the associated declaration are emphasized in
545549
the output.
546550
This emphasis can take the form of italics, boldface, a hyperlink, etc.
547-
How it is emphasized depends on what it is - a function parameter, type,
551+
How it is emphasized depends on what it is $(MDASH) a function parameter, type,
548552
D keyword, etc.
549553
To prevent unintended emphasis of an identifier, it can be preceded by
550554
an underscore ($(UNDERSCORE)). The underscore will be stripped from the output.
551555
)
552556

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

555570
$(P

0 commit comments

Comments
 (0)