diff --git a/docs/contents/demo.md b/docs/contents/demo.md index f58d6ef6..88297592 100644 --- a/docs/contents/demo.md +++ b/docs/contents/demo.md @@ -291,3 +291,15 @@ For example, for `MCMCChains`, ```jl @sco(chain) ``` + +### Note box + +To write note boxes, you can use + +``` +> **_NOTE:_** The note content. +``` + +> **_NOTE:_** The note content. + +This way is fully supported by Pandoc, so it will be correctly converted to outputs such as PDF or DOCX. diff --git a/src/html.jl b/src/html.jl index c421eca8..f7fefada 100644 --- a/src/html.jl +++ b/src/html.jl @@ -113,7 +113,14 @@ function html_page_name(html) (id=id, text=first(sections).text) end -html_href(text, link, level) = """$text""" +function html_href(text, link, level) + threshold = 33 + if threshold < length(text) + shortened = text[1:threshold] + text = shortened * ".." + end + """$text""" +end html_li(text) = """