Conversation
|
Are these used/useful for the LaTeX output? |
LaTeX only overwrites the edit: |
|
Btw as this mostly changes the license header urls (other links already use |
| @@ -9,9 +9,9 @@ version(unittest) import std.conv : text; | |||
| /** | |||
| $(D KRRegion) draws inspiration from the $(LINK2 | |||
| std_experimental_allocator_region.html, region allocation strategy) and also the | |||
There was a problem hiding this comment.
Resolve the merge conflict by incorporating #4409: $(MREF_ALTTEXT region allocation strategy, std,experimental,allocator,building_blocks,region).
sed 's/(WEB http:\/\//(WEB /' -i **/*.d
Done ;-) |
etc/c/odbc/sql.d
Outdated
| (refer to the $(WEB | ||
| forum.dlang.org/post/cfk7ql$(DOLLAR)1p4n$(DOLLAR)1@digitaldaemon.com, | ||
| (refer to the $(LINK2 | ||
| http://forum.dlang.org/post/cfk7ql$(DOLLAR)1p4n$(DOLLAR)1@digitaldaemon.com, |
There was a problem hiding this comment.
Unfortunately, this is no good. Ddoc interprets "http:" as a section. Can't have a break between "LINK2" and "http:".
c6b4e3b to
c4b7e93
Compare
Okay I adapted the regular expression for the last commit to put the |
|
Looks good to me. |
|
(somehow I pressed on the wrong button - sorry) |
|
Macros that encapsulate the protocol are actually useful and should stay. If anything LINK2 might be phased out. The problem goes as follows. Links are usually long strings with no space in between. So whenever they occur in text, editors see them as a long word. Some editors have a "format paragraph" feature that breaks long lines into multiple lines. Naturally, since the link is a long word, it often appears as the only (or first) word on a line. At that point, something very unpleasant happens: DDOC thinks "http:" is a paragraph heading (like "Returns:" and the rest of the URL is the rest of the paragraph. So the format gets messed up. The fix is awkward - you need to always make sure something else comes before the URL on each line. Obviously editors have no idea about that. So using (I don't understand the argument around WEB. Aren't modern sites switching automatically to HTTPS if asked for HTTP?) Anyhow, I suggest consolidating around HTTP and HTTPS (and FTP if necessary) and phasing out everything else. Works? |
Yes, but only a small minority (only 21 from the Top 100 enable SSL by default) :/ https://www.wired.com/2016/03/https-adoption-google-report/
Alrighty - I rebased the PR to just include the fix for the broken |
|
Thanks, so far so good. Feel free to replace WEB with HTTP/HTTPS in a later pass. |
But then you run straight into the next issue. The supposed fix doesn't work with indentation: This puts spaces between "http://" and "this.is/a/very/long/url", breaking the URL. Generally, having anything but a single space between the macro name and the first argument is asking for trouble. So all HTTP buys us is this:
And the price is:
I don't think HTTP is a net benefit. |
As mentioned in dlang/dlang.org#1337 and dlang/dlang.org#1333, yet another
sedadventure!Today's purge are the
WEB,HTTP,HTTPSmacros.Reason: We still have way too many custom ddoc macros to make simple links - creating a link should be simple!
Have a look at this selection:
Some people might argue that
WEBis great, because it's a bit shorter, buthttp://(happens quite often, even here in Phobos)WEBalways resolves tohttp://Or to quote Andrei from a recent forum discussion:
Hence this PR replaces all
WEB,HTTPandHTTPSmacros withLINK2. Ideally in the future we can use "markdown-like" links in ddoc - we all love them from Github, right?Commands
This PR is done fully automated - again regular expressions to the help!
sed 's/(WEB http:\/\//(WEB /' -i **/*.dsed 's/(WEB /(LINK2 http:\/\//' -i */.dsed 's/\$(WEB$/\$(LINK2\nhttp:\/\//' -i **/*.dperl -0777 -i -pe 's/\$\(WEB\n(\s*)/\$(LINK2\n\1http:\/\//g' **/*.dShould I add a simple grep to
travis.ymlor can we ensure - with the help of DAutotester - that those macros aren't used in the future?