Skip to content
Browse files

[windoc] Add support for external url launching

  • Loading branch information...
1 parent c81b42c commit 73a689b9601891f77dbbf57554a0030d71869a2e @garuma garuma committed
Showing with 7 additions and 0 deletions.
  1. +7 −0 windoc/WinDoc/Program.cs
View
7 windoc/WinDoc/Program.cs
@@ -24,11 +24,18 @@ static void Main(string[] args)
{ "docdir=", dir => docSources.Add (dir) },
}.Parse (args);
+ if (initialUrl.StartsWith ("mdoc://")) {
+ initialUrl = initialUrl.Substring ("mdoc://".Length); // Remove leading scheme
+ initialUrl = initialUrl.Substring (0, initialUrl.Length - 1); // Remove trailing '/'
+ initialUrl = Uri.UnescapeDataString (initialUrl); // Unescape URL
+ }
+
SetupLogging ();
PrepareCache ();
ExtractImages ();
// Load documentation
+ Directory.SetCurrentDirectory (Path.GetDirectoryName (typeof (Program).Assembly.Location));
Root = RootTree.LoadTree (null);
foreach (var dir in docSources)
Root.AddSource (dir);

0 comments on commit 73a689b

Please sign in to comment.
Something went wrong with that request. Please try again.