From 8e7ec6e1fdb8b0f6eca626ab9247c05bae7589de Mon Sep 17 00:00:00 2001 From: mthh Date: Fri, 7 Apr 2017 02:37:46 +0200 Subject: [PATCH 1/3] should fix sections created with chapter of more than two digits --- src/renderer/html_handlebars/helpers/toc.rs | 2 +- src/theme/_FontAwesome/fonts/FontAwesome.otf | Bin 106260 -> 106245 bytes .../fonts/fontawesome-webfont.ttf | Bin 138204 -> 138182 bytes .../fonts/fontawesome-webfont.woff | Bin 81284 -> 81283 bytes src/theme/favicon.png | Bin 5679 -> 5678 bytes 5 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/html_handlebars/helpers/toc.rs b/src/renderer/html_handlebars/helpers/toc.rs index 3fb7b904..c7cc074a 100644 --- a/src/renderer/html_handlebars/helpers/toc.rs +++ b/src/renderer/html_handlebars/helpers/toc.rs @@ -33,7 +33,7 @@ impl HelperDef for RenderToc { } let level = if let Some(s) = item.get("section") { - s.len() / 2 + s.matches(".").count() } else { 1 }; diff --git a/src/theme/_FontAwesome/fonts/FontAwesome.otf b/src/theme/_FontAwesome/fonts/FontAwesome.otf index 681bdd4d4c8dddbaeb4d4f2a1f58c38cad92afe0..7860788d1058519fda5cda3c982b2b2b1df146f3 100644 GIT binary patch delta 113 zcmbQTkF9kd+lI|ro405gaBqHU`p}S(Yx>0$Mv2W2(oMxTi`8G_fC;d5Y&Y4wZ;v?> zOn`rX;mqxg5sWK%w`-*_K4IU^pU23_yj`-8F_dw8ei5Sp$M%LQ#(dW8ALjvWdqBz&8*Mr!vQv82NVDR delta 16 XcmZqv&C>FlWdqAIM&8XV&+5YgKkx@3 diff --git a/src/theme/favicon.png b/src/theme/favicon.png index a5b1aa16c4dcb6c872cb5af799bfc9b5552c7b9e..9e01a19fef7eac41ace13e5f5db15664a1b81a1b 100644 GIT binary patch delta 13 UcmZ3lvrdPlGr-S%BdeAe03kvI9smFU delta 14 VcmZ3dvtEa_Gr-TCcO#3I7yu-&1S
Date: Fri, 7 Apr 2017 10:47:45 +0200 Subject: [PATCH 2/3] Revert "should fix sections created with chapter of more than two digits" This reverts commit 8e7ec6e1fdb8b0f6eca626ab9247c05bae7589de. --- src/renderer/html_handlebars/helpers/toc.rs | 2 +- src/theme/_FontAwesome/fonts/FontAwesome.otf | Bin 106245 -> 106260 bytes .../fonts/fontawesome-webfont.ttf | Bin 138182 -> 138204 bytes .../fonts/fontawesome-webfont.woff | Bin 81283 -> 81284 bytes src/theme/favicon.png | Bin 5678 -> 5679 bytes 5 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/html_handlebars/helpers/toc.rs b/src/renderer/html_handlebars/helpers/toc.rs index c7cc074a..3fb7b904 100644 --- a/src/renderer/html_handlebars/helpers/toc.rs +++ b/src/renderer/html_handlebars/helpers/toc.rs @@ -33,7 +33,7 @@ impl HelperDef for RenderToc { } let level = if let Some(s) = item.get("section") { - s.matches(".").count() + s.len() / 2 } else { 1 }; diff --git a/src/theme/_FontAwesome/fonts/FontAwesome.otf b/src/theme/_FontAwesome/fonts/FontAwesome.otf index 7860788d1058519fda5cda3c982b2b2b1df146f3..681bdd4d4c8dddbaeb4d4f2a1f58c38cad92afe0 100644 GIT binary patch delta 130 zcmZqO$2Mgj+lI|rjJ%sSYZ-6@smG=d4H0$Mv2W2(oMxTi`8G_fC;d5Y&Y4wZ;v?> zOn`rX;mqxg5sWK%w`-*_K4IU^pU23_yj`-8F_dw8ei5Sp$M%LQ#(dW8ALFlWdqAIM&8XV&+5YgKkx@3 delta 14 VcmZqq&C>jvWdqBz&8*Mr!vQv82NVDR diff --git a/src/theme/favicon.png b/src/theme/favicon.png index 9e01a19fef7eac41ace13e5f5db15664a1b81a1b..a5b1aa16c4dcb6c872cb5af799bfc9b5552c7b9e 100644 GIT binary patch delta 14 VcmZ3dvtEa_Gr-TCcO#3I7yu-&1S
Date: Fri, 7 Apr 2017 12:46:28 +0200 Subject: [PATCH 3/3] Should fix sections created with chapter of more than two digits --- src/renderer/html_handlebars/helpers/toc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/html_handlebars/helpers/toc.rs b/src/renderer/html_handlebars/helpers/toc.rs index 3fb7b904..c7cc074a 100644 --- a/src/renderer/html_handlebars/helpers/toc.rs +++ b/src/renderer/html_handlebars/helpers/toc.rs @@ -33,7 +33,7 @@ impl HelperDef for RenderToc { } let level = if let Some(s) = item.get("section") { - s.len() / 2 + s.matches(".").count() } else { 1 };