diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-17 19:19:13 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-17 19:19:13 +0000 |
| commit | d69a818887eb571622e8bc98f06b3eda3491dbbd (patch) | |
| tree | 6e6f5e61f421aeb4a24123d3b5a4f5dd15e43bde /extra | |
| parent | update README (diff) | |
| download | alive-d69a818887eb571622e8bc98f06b3eda3491dbbd.tar.gz alive-d69a818887eb571622e8bc98f06b3eda3491dbbd.zip | |
doc/guide: small formatting & typos
Diffstat (limited to 'extra')
| -rw-r--r-- | extra/docs.moon | 2 | ||||
| -rw-r--r-- | extra/layout.moon | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/extra/docs.moon b/extra/docs.moon index 4bc4892..d1553df 100644 --- a/extra/docs.moon +++ b/extra/docs.moon @@ -75,7 +75,7 @@ spit OUT, switch command contents = slurp file require 'discount' - layout compile autoref contents, 'githubtags', 'fencedcode' + layout compile (autoref contents), 'githubtags', 'fencedcode' when 'ldoc' BASE = '$(base)' diff --git a/extra/layout.moon b/extra/layout.moon index 2741a70..a3d67c8 100644 --- a/extra/layout.moon +++ b/extra/layout.moon @@ -40,6 +40,9 @@ link = (ref) -> mod, sym = ref\match '^(.+)/(.*)$' abs "reference/#{mod or 'index'}.html##{sym or ref}" +escape = (str) -> + (str\gsub '([*`])', '\\%1') + -- link to a reference r = (text, ref) -> import a, code from require 'extra.dom' @@ -48,7 +51,7 @@ r = (text, ref) -> a text, :href else text = text\gsub '/$', '' - a (code text), :href + a (code escape text), :href -- substitute markdown-style reference links autoref = (str) -> |
