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/layout.moon | |
| parent | update README (diff) | |
| download | alive-d69a818887eb571622e8bc98f06b3eda3491dbbd.tar.gz alive-d69a818887eb571622e8bc98f06b3eda3491dbbd.zip | |
doc/guide: small formatting & typos
Diffstat (limited to 'extra/layout.moon')
| -rw-r--r-- | extra/layout.moon | 5 |
1 files changed, 4 insertions, 1 deletions
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) -> |
