Repository: tlienart/Franklin.jl
Pull request #708 (2020-11-13 13:25:32)

Bug fixes and patch release


Patch:
diff --git a/Project.toml b/Project.toml
index f04fe994..ec6a7060 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,7 +1,7 @@
 name = "Franklin"
 uuid = "713c75ef-9fc9-4b05-94a9-213340da978e"
 authors = ["Thibaut Lienart <tlienart@me.com>"]
-version = "0.10.11"
+version = "0.10.12"
 
 [deps]
 Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -23,11 +23,11 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
 [compat]
 DocStringExtensions = "0.8"
 ExprTools = "0.1"
-FranklinTemplates = "0.6,0.7, 0.8"
-HTTP = "0.8"
+FranklinTemplates = "0.6, 0.7, 0.8"
+HTTP = "0.8, 0.9"
 Literate = "2.2"
-LiveServer = "0.4,0.5"
-NodeJS = "0.6,1"
+LiveServer = "0.4, 0.5, 0.6"
+NodeJS = "0.6, 1, 1.1"
 OrderedCollections = "1.1"
 julia = "1.3"
 
diff --git a/demos/index.md b/demos/index.md
index 759bb71c..d5e18917 100644
--- a/demos/index.md
+++ b/demos/index.md
@@ -13,7 +13,7 @@ The ordering is reverse chronological but just use the table of contents to guid
 
 **Note**: an important philosophy here is that if you can write a Julia function that would produce the HTML you want, then write that function and let Franklin call it.
 
-**Note 2**: the numbering in georgian script in the table of content is on purpose, no good reason for it... 🚀
+**Note 2**: the numbering in georgian script in the table of content is on purpose (though for no particularly good reason other than that it looks nice... 🇬🇪)
 
 \toc
 
diff --git a/docs/index.md b/docs/index.md
index 96ae1922..24065017 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -23,6 +23,8 @@ _click on the '&check;' sign to know more_
 * \goto{/code/literate/} Straightforward integration with [Literate.jl](https://github.com/fredrikekre/Literate.jl).
 @@
 
+\note{If you already have experience with Franklin and just want to keep an eye on (new) tips and tricks, have a look at the short [demos](/demos/)}
+
 ## Quick start
 
 To install Franklin with Julia **≥ 1.3**,
diff --git a/src/regexes.jl b/src/regexes.jl
index 3c32740e..aa1e3d5d 100644
--- a/src/regexes.jl
+++ b/src/regexes.jl
@@ -68,7 +68,7 @@ const CODE_3_PAT = Regex(
         "```([a-zA-Z][a-zA-Z-]*)" *    # language
         "(?:(" * # optional script name
             "\\:[\\p{L}\\\\\\/_\\.]" * # :(...) start of script name
-            "[\\p{L}_0-9-\\\\\\/]+"  * # script name
+            "[\\p{L}_0-9-\\\\\\/]*"  * # script name
             "(?:\\.[a-zA-Z0-9]+)?"   * # script extension
         ")|(?:\\n|\\s))" *
         "\\s*\\n?((?:.|\\n)*)```") # rest of the code
diff --git a/src/utils/html.jl b/src/utils/html.jl
index 81bfbaef..91dfb4be 100644
--- a/src/utils/html.jl
+++ b/src/utils/html.jl
@@ -130,17 +130,18 @@ Helper function to get the relative url of the current page.
 """
 function url_curpage()
     # get the relative path to current page and split extension (.md)
-    fn = splitext(locvar(:fd_rpath))[1]
-    # if it's not `index` then add `index`:
-    if splitdir(fn)[2] != "index"
-        fn = joinpath(fn, "index")
+    fn, ext = splitext(locvar(:fd_rpath))
+    if ext != ".html"
+        # if it's not `index` then add `index`:
+        if splitdir(fn)[2] != "index"
+            fn = joinpath(fn, "index")
+        end
+        fn *= ".html"
     end
-    fn *= ".html"
     # unixify
     fn = unixify(fn)
     # if it does not start with "/", add a "/" in front
     startswith(fn, "/") || (fn = "/" * fn)
-    # append .html and return
     return fn
 end
 


Test patch:
diff --git a/test/regexes.jl b/test/regexes.jl
index a36acb21..5c614228 100644
--- a/test/regexes.jl
+++ b/test/regexes.jl
@@ -96,6 +96,7 @@ end
 ### Code blocks
 @testset "code" begin
     list = (
+        "```julia:n some code```", # issue 705
         "```julia:ex some code```",
         "```cpp:πγ some code```",
         "```julia:πγ.jl some code```",