Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7043 from WalterBright/fix17697
fix Issue 17697 - Ddoc: automatically highlight URLs outside of macro… merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
582 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Fix Issue 17697 - Ddoc: automatically highlight URLs outside of macro arguments | ||
|
||
URLs which appear in Ddoc text: | ||
|
||
--- | ||
/**** | ||
* http://www.fooa.com/test1 | ||
*/ | ||
--- | ||
|
||
will be treated as if they were written: | ||
|
||
--- | ||
/**** | ||
* $(LINK http://www.fooa.com/test1) | ||
*/ | ||
--- | ||
|
||
and a clickable hyperlink will be emitted to the resulting .html file. | ||
|
||
This detection does not happen if the URL is part of a macro argument: | ||
|
||
--- | ||
/**** | ||
* $(DOLLAR)$(LPAREN)ABC http://www.fooa.com/test1$(RPAREN) | ||
*/ | ||
--- | ||
|
||
The behavior of that is unchanged. URLs can start with `http://` or `https://` | ||
|
||
`http:` and `https:` at the beginning of the line are no longer treated | ||
as section headings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// PERMUTE_ARGS: | ||
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o- | ||
// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 17697 | ||
|
||
/*** | ||
* See: | ||
* http://www.fooa.com/test1 | ||
* http://www.fooa.com/_test1 | ||
* https://www.foob.com/test1 | ||
* $(LINK http://www.fooc.com/test1) | ||
* $(LINK2 http://www.food.com/test1, test1) | ||
*/ | ||
|
||
module test1; | ||
|
||
int a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.