all repos — hastyscribe @ 07f570b7f00a428c1bcca9d21e3f04719f5f5621

A professional markdown compiler.

Refactoring headings support
h3rald h3rald@h3rald.com
Sun, 08 Dec 2013 18:06:10 +0100
commit

07f570b7f00a428c1bcca9d21e3f04719f5f5621

parent

bd6328f90eb17f54689f8e5049d1f3e7eaeec7bd

5 files changed, 81 insertions(+), 82 deletions(-)

jump to
M assets/hastyscribe.cssassets/hastyscribe.css

@@ -1,1 +1,1 @@

-/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}body{background-color:#fff;margin:0 auto;height:100%;zoom:1;letter-spacing:normal;word-spacing:normal;color:#333;font:15px "Calibri","Helvetica","Arial","Freesans","Clean",sans-serif;line-height:1.4;-webkit-font-smoothing:antialiased;width:960px;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto}@media screen and (max-width:959px){body{width:100%}}@media screen and (min-width:960px){body{width:960px}}#main,#footer,#header{width:96%;margin:auto}#footer{text-align:center;font-size:70%}#toc{margin-top:-10px}#toc ul{list-style-type:none;padding-left:20px}#toc>ul{padding-left:0}ul,ol{padding-left:30px}dl{margin-left:5px}dl dt{font-weight:bold}h1,h2,h3,h4,h5,h6{color:#111;border-bottom:1px solid #ddd}blockquote{border-left:3px solid #dedede;padding:0 10px;margin:10px 0;font-style:italic}pre{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:#efefef;border:1px solid #999;margin:auto;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace}pre code{box-shadow:none;padding:0;border:0}table{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:transparent;border:1px solid #999;border-collapse:collapse;margin:15px auto;border-spacing:0;empty-cells:show}table thead{background:#efefef;color:#222;text-align:left;vertical-align:bottom}table td,table th{background-color:transparent;border:1px solid #999;font-size:inherit;margin:0;overflow:visible;padding:6px 12px}address{font-style:italic;color:#999}hr{border:0;height:1px;background-image:-webkit-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-moz-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-ms-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0))}code,span.code{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}kbd,span.kbd{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-weight:bold;border-right:1px solid #333;border-bottom:1px solid #333;line-height:.9em;font-size:85%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}mark,span.mark{padding:0 1px;color:#222}abbr,span.abbr{font-variant:small-caps;font-weight:bolder;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}abbr:hover,span.abbr:hover{cursor:help}samp,span.samp{font-size:80%;color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #efefef;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}var,span.var{font-size:80%;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-weight:bold;font-style:normal;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}cite,span.cite{font-weight:bold;font-style:italic;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}q,span.q{font-style:italic;color:#666;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}tt,span.tt{font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}a,a:visited{color:#4183c4;text-decoration:none}a:hover,a:visited:hover{text-decoration:underline}.note{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.note p{margin-top:0;margin-bottom:0}.note p:first-child{font-size:105%;font-style:italic;color:#333}.warning{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #555;padding:7px 7px 0 7px}.warning p{margin-top:0;margin-bottom:0}.warning p:first-child{font-size:105%;font-weight:bold;color:#333}.sidebar{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.sidebar p{margin-top:0;margin-bottom:0}.sidebar p:first-child{font-size:105%;font-weight:bold;color:#333}.note,.warning{width:66.6667%}@media screen and (max-width:599px){.note,.warning{width:96%}}@media screen and (min-width:600px){.note,.warning{width:66.6667%}}.todo{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.todo:before{font-variant:small-caps;font-size:120%;content:"todo"}.fixme{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.fixme:before{font-variant:small-caps;font-size:120%;content:"fixme"}.deadline{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.deadline:before{font-variant:small-caps;font-size:120%;content:"deadline"}.important{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.important:before{font-variant:small-caps;font-size:120%;content:"important"}.urgent{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.urgent:before{font-variant:small-caps;font-size:120%;content:"urgent"}.red-circle:before{font-style:normal;font-size:100%;color:#c30;content:"\25CF"}.green-circle:before{font-style:normal;font-size:100%;color:#0c3;content:"\25CF"}.yellow-circle:before{font-style:normal;font-size:100%;color:#f5b800;content:"\25CF"}.gray-circle:before{font-style:normal;font-size:100%;color:#999;content:"\25CF"}.star:before{font-style:normal;font-size:100%;color:#f5b800;content:"\2605"}.heart:before{font-style:normal;font-size:100%;color:#c30;content:"\2665"}.cross:before{font-style:normal;font-size:100%;color:#c30;content:"\2718 "}.check:before{font-style:normal;font-size:100%;color:#0c3;content:"\2714 "}+/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}body{background-color:#fff;margin:0 auto;height:100%;zoom:1;letter-spacing:normal;word-spacing:normal;color:#333;font:15px "Calibri","Helvetica","Arial","Freesans","Clean",sans-serif;line-height:1.4;-webkit-font-smoothing:antialiased;width:960px;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto}@media screen and (max-width:959px){body{width:100%}}@media screen and (min-width:960px){body{width:960px}}#main,#footer,#header{width:96%;margin:auto}#footer{text-align:center;font-size:70%}#toc{margin-top:-10px}#toc ul{list-style-type:none;padding-left:20px}#toc>ul{padding-left:0}ul,ol{padding-left:30px}dl{margin-left:5px}dl dt{font-weight:bold}h1,h2,h3,h4,h5,h6{color:#111;border-bottom:1px solid #ddd}blockquote{border-left:3px solid #dedede;padding:0 10px;margin:10px 0;font-style:italic}pre{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:#efefef;border:1px solid #999;margin:auto;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace}pre code{box-shadow:none;padding:0;border:0}table{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:transparent;border:1px solid #999;border-collapse:collapse;margin:15px auto;border-spacing:0;empty-cells:show}table thead{background:#efefef;color:#222;text-align:left;vertical-align:bottom}table td,table th{background-color:transparent;border:1px solid #999;font-size:inherit;margin:0;overflow:visible;padding:6px 12px}address{font-style:italic;color:#999}hr{border:0;height:1px;background-image:-webkit-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-moz-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-ms-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0))}code,span.code{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}kbd,span.kbd{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-weight:bold;border-right:1px solid #333;border-bottom:1px solid #333;line-height:.9em;font-size:85%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}mark,span.mark{padding:0 1px;color:#222}abbr,span.abbr{font-variant:small-caps;font-weight:bolder;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}abbr:hover,span.abbr:hover{cursor:help}samp,span.samp{font-size:80%;color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #efefef;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}var,span.var{font-size:80%;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-weight:bold;font-style:normal;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}cite,span.cite{font-weight:bold;font-style:italic;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}q,span.q{font-style:italic;color:#666;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}tt,span.tt{font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}a,a:visited{color:#4183c4;text-decoration:none}a:hover,a:visited:hover{text-decoration:underline}.note{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.note p{margin-top:0;margin-bottom:0}.note p:first-child{font-size:105%;font-style:italic;color:#333}.warning{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #555;padding:7px 7px 0 7px}.warning p{margin-top:0;margin-bottom:0}.warning p:first-child{font-size:105%;font-weight:bold;color:#333}.sidebar{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.sidebar p{margin-top:0;margin-bottom:0}.sidebar p:first-child{font-size:105%;font-weight:bold;color:#333}.note,.warning{width:66.6667%}@media screen and (max-width:599px){.note,.warning{width:96%}}@media screen and (min-width:600px){.note,.warning{width:66.6667%}}.todo{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.todo:before{font-variant:small-caps;font-size:120%;content:"todo"}.fixme{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.fixme:before{font-variant:small-caps;font-size:120%;content:"fixme"}.deadline{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.deadline:before{font-variant:small-caps;font-size:120%;content:"deadline"}.important{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.important:before{font-variant:small-caps;font-size:120%;content:"important"}.urgent{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.urgent:before{font-variant:small-caps;font-size:120%;content:"urgent"}.red-circle:before{font-style:normal;font-size:100%;color:#c30;content:"\25CF"}.green-circle:before{font-style:normal;font-size:100%;color:#0c3;content:"\25CF"}.yellow-circle:before{font-style:normal;font-size:100%;color:#f5b800;content:"\25CF"}.gray-circle:before{font-style:normal;font-size:100%;color:#999;content:"\25CF"}.star:before{font-style:normal;font-size:100%;color:#f5b800;content:"\2605"}.heart:before{font-style:normal;font-size:100%;color:#c30;content:"\2665"}.cross:before{font-style:normal;font-size:100%;color:#c30;content:"\2718 "}.check:before{font-style:normal;font-size:100%;color:#0c3;content:"\2714 "}.headings h2{counter-reset:h3;counter-increment:h2}.headings h2::before{content:counter(h2) "\00A0\00A0"}.headings h3{counter-reset:h4;counter-increment:h3}.headings h3::before{content:counter(h2) "." counter(h3) "\00A0\00A0"}.headings h4{counter-reset:h5;counter-increment:h4}.headings h4::before{content:counter(h2) "." counter(h3) "." counter(h4) "\00A0\00A0"}.headings h5{counter-reset:h6;counter-increment:h5}.headings h5::before{content:counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "\00A0\00A0"}.headings h6{counter-increment:h6}.headings h6::before{content:counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) "\00A0\00A0"}.headings #toc{counter-reset:toc2}.headings #toc li li a{counter-reset:toc3;counter-increment:toc2}.headings #toc li li a::before{content:counter(toc2) "\00A0\00A0"}.headings #toc li li li a{counter-reset:toc4;counter-increment:toc3}.headings #toc li li li a::before{content:counter(toc2) "." counter(toc3) "\00A0\00A0"}.headings #toc li li li li a{counter-reset:toc5;counter-increment:toc4}.headings #toc li li li li a::before{content:counter(toc2) "." counter(toc3) "." counter(toc4) "\00A0\00A0"}.headings #toc li li li li li a{counter-reset:toc6;counter-increment:toc5}.headings #toc li li li li li a::before{content:counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) "\00A0\00A0"}.headings #toc li li li li li li a{counter-increment:toc6}.headings #toc li li li li li li a::before{content:counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) "." counter(toc6) "\00A0\00A0"}
M assets/hastyscribe.lessassets/hastyscribe.less

@@ -4,3 +4,4 @@ @import "mixins.less";

@import "elements.less"; @import "notes.less"; @import "badges.less"; +@import "headings.less";
D assets/headings.css

@@ -1,75 +0,0 @@

-h2 { - counter-reset:h3; - counter-increment: h2; -} -h2::before { - content: counter(h2) " " "\2013" " "; -} -h3 { - counter-reset:h4; - counter-increment: h3; -} -h3::before { - content: counter(h2) "." counter(h3) " " "\2013" " "; -} -h4 { - counter-reset:h5; - counter-increment: h4; -} -h4::before { - content: counter(h2) "." counter(h3) "." counter(h4) " " "\2013" " "; -} -h5 { - counter-reset:h6; - counter-increment: h5; -} -h5::before { - content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " " "\2013" " "; -} -h6 { - counter-increment: h6; -} -h6::before { - content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " " "\2013" " "; -} - -/***************/ - -#toc { - counter-reset: toc2; -} - -#toc li li a { - counter-reset:toc3; - counter-increment: toc2; -} -#toc li li a::before { - content: counter(toc2) " " "\2013" " "; -} -#toc li li li a { - counter-reset:toc4; - counter-increment: toc3; -} -#toc li li li a::before { - content: counter(toc2) "." counter(toc3) " " "\2013" " "; -} -#toc li li li li a { - counter-reset:toc5; - counter-increment: toc4; -} -#toc li li li li a::before { - content: counter(toc2) "." counter(toc3) "." counter(toc4) " " "\2013" " "; -} -#toc li li li li li a { - counter-reset:toc6; - counter-increment: toc5; -} -#toc li li li li li a::before { - content: counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) " " "\2013" " "; -} -#toc li li li li li li a { - counter-increment: toc6; -} -#toc li li li li li li a::before { - content: counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) "." counter(toc6) " " "\2013" " "; -}
A assets/headings.less

@@ -0,0 +1,75 @@

+.headings h2 { + counter-reset:h3; + counter-increment: h2; +} +.headings h2::before { + content: counter(h2) "\00A0\00A0"; +} +.headings h3 { + counter-reset:h4; + counter-increment: h3; +} +.headings h3::before { + content: counter(h2) "." counter(h3) "\00A0\00A0"; +} +.headings h4 { + counter-reset:h5; + counter-increment: h4; +} +.headings h4::before { + content: counter(h2) "." counter(h3) "." counter(h4) "\00A0\00A0"; +} +.headings h5 { + counter-reset:h6; + counter-increment: h5; +} +.headings h5::before { + content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "\00A0\00A0"; +} +.headings h6 { + counter-increment: h6; +} +.headings h6::before { + content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) "\00A0\00A0"; +} + +/***************/ + +.headings #toc { + counter-reset: toc2; +} + +.headings #toc li li a { + counter-reset:toc3; + counter-increment: toc2; +} +.headings #toc li li a::before { + content: counter(toc2) "\00A0\00A0"; +} +.headings #toc li li li a { + counter-reset:toc4; + counter-increment: toc3; +} +.headings #toc li li li a::before { + content: counter(toc2) "." counter(toc3) "\00A0\00A0"; +} +.headings #toc li li li li a { + counter-reset:toc5; + counter-increment: toc4; +} +.headings #toc li li li li a::before { + content: counter(toc2) "." counter(toc3) "." counter(toc4) "\00A0\00A0"; +} +.headings #toc li li li li li a { + counter-reset:toc6; + counter-increment: toc5; +} +.headings #toc li li li li li a::before { + content: counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) "\00A0\00A0"; +} +.headings #toc li li li li li li a { + counter-increment: toc6; +} +.headings #toc li li li li li li a::before { + content: counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) "." counter(toc6) "\00A0\00A0"; +}
M hastyscribe.nimhastyscribe.nim

@@ -15,7 +15,6 @@ --notoc Do not generate a Table of Contents."""

var generate_toc = true const src_css = "assets/hastyscribe.css".slurp -const src_headings_css = "assets/headings.css".slurp const src_highlight_js = "assets/highlight.pack.js".slurp # Procedures

@@ -77,7 +76,7 @@ # Document Variables

var metadata = TMDMetaData(title:"", author:"", date:"") var body = source.md(MKD_DOTOC or MKD_EXTRA_FOOTNOTE, metadata) var main_css = src_css.style_tag - var headings_css = src_headings_css.style_tag + var headings = " class=\"headings\"" # Manage metadata if metadata.author != "":

@@ -95,7 +94,7 @@

if generate_toc == true and metadata.toc != "": toc = "<div id=\"toc\">" & metadata.toc & "</div>" else: - headings_css = "" + headings = "" toc = "" # Date parsing and validation

@@ -116,9 +115,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="author" content="$author"> <meta name="generator" content="HastyScribe"> $main_css - $headings_css </head> -<body> +<body$headings> $header_tag $toc <div id="main">

@@ -132,7 +130,7 @@ $highlight

hljs.tabReplace = ' '; hljs.initHighlighting(); </script> -</body>""" % ["title_tag", title_tag, "header_tag", header_tag, "author", metadata.author, "date", timeinfo.format("MMMM d, yyyy"), "toc", toc, "main_css", main_css, "headings_css", headings_css, "body", body, "highlight", src_highlight_js] +</body>""" % ["title_tag", title_tag, "header_tag", header_tag, "author", metadata.author, "date", timeinfo.format("MMMM d, yyyy"), "toc", toc, "main_css", main_css, "headings", headings, "body", body, "highlight", src_highlight_js] document = embed_images(document) output_file.writeFile(document)