Skip to content

Commit

Permalink
Update Makefile and rebuild doc/syntax.html.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Dec 12, 2024
1 parent 7e95468 commit b0cfecd
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 30 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ VIMDIR?=~/.vim

all: doc/syntax.html

# luarocks install --lua-version=5.4 djot

doc/syntax.html: doc/syntax.md
pandoc --lua-filter doc/code-examples.lua $< -t html -o $@ -s --css doc/syntax.css --self-contained --wrap=preserve --toc --section-divs -Vpagetitle="Djot syntax reference"
pandoc --lua-filter doc/code-examples.lua $< -t html -o $@ -s --css doc/syntax.css --embed-resources --wrap=preserve --toc --section-divs -Vpagetitle="Djot syntax reference"

58 changes: 29 additions & 29 deletions doc/syntax.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}

ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
Expand Down Expand Up @@ -233,9 +235,6 @@
font-size: 78%;
}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<nav id="TOC" role="doc-toc">
Expand Down Expand Up @@ -762,7 +761,7 @@ <h3>Footnote reference</h3>
<h3>Line break</h3>
<p>Line breaks in inline content are treated as “soft” breaks; they may be
rendered as spaces, or (in contexts where newlines are treated
semantically like spaces, such as HTML) as as newlines.</p>
semantically like spaces, such as HTML) as newlines.</p>
<p>To get a hard line break (of the sort represented by HTML’s <code>&lt;br&gt;</code>), use
backslash + newline:</p>
<div class="example">
Expand Down Expand Up @@ -815,7 +814,7 @@ <h3>Symbols</h3>
<pre><code>My reaction is :+1: :smiley:.</code></pre>
</div>
<div class="html">
<pre><code>&lt;p&gt;My reaction is 👍 😃.&lt;/p&gt;
<pre><code>&lt;p&gt;My reaction is :+1: :smiley:.&lt;/p&gt;
</code></pre>
</div>
</div>
Expand Down Expand Up @@ -1080,89 +1079,89 @@ <h3>List item</h3>
<p>The following basic types of list markers are available:</p>
<table>
<thead>
<tr class="header">
<tr>
<th>Marker</th>
<th>List type</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<tr>
<td><code>-</code></td>
<td>bullet</td>
</tr>
<tr class="even">
<tr>
<td><code>+</code></td>
<td>bullet</td>
</tr>
<tr class="odd">
<tr>
<td><code>*</code></td>
<td>bullet</td>
</tr>
<tr class="even">
<tr>
<td><code>1.</code></td>
<td>ordered, decimal-enumerated, followed by period</td>
</tr>
<tr class="odd">
<tr>
<td><code>1)</code></td>
<td>ordered, decimal-enumerated, followed by parenthesis</td>
</tr>
<tr class="even">
<tr>
<td><code>(1)</code></td>
<td>ordered, decimal-enumerated, enclosed in parentheses</td>
</tr>
<tr class="odd">
<tr>
<td><code>a.</code></td>
<td>ordered, lower-alpha-enumerated, followed by period</td>
</tr>
<tr class="even">
<tr>
<td><code>a)</code></td>
<td>ordered, lower-alpha-enumerated, followed by parenthesis</td>
</tr>
<tr class="odd">
<tr>
<td><code>(a)</code></td>
<td>ordered, lower-alpha-enumerated, enclosed in parentheses</td>
</tr>
<tr class="even">
<tr>
<td><code>A.</code></td>
<td>ordered, upper-alpha-enumerated, followed by period</td>
</tr>
<tr class="odd">
<tr>
<td><code>A)</code></td>
<td>ordered, upper-alpha-enumerated, followed by parenthesis</td>
</tr>
<tr class="even">
<tr>
<td><code>(A)</code></td>
<td>ordered, upper-alpha-enumerated, enclosed in parentheses</td>
</tr>
<tr class="odd">
<tr>
<td><code>i.</code></td>
<td>ordered, lower-roman-enumerated, followed by period</td>
</tr>
<tr class="even">
<tr>
<td><code>i)</code></td>
<td>ordered, lower-roman-enumerated, followed by parenthesis</td>
</tr>
<tr class="odd">
<tr>
<td><code>(i)</code></td>
<td>ordered, lower-roman-enumerated, enclosed in parentheses</td>
</tr>
<tr class="even">
<tr>
<td><code>I.</code></td>
<td>ordered, upper-roman-enumerated, followed by period</td>
</tr>
<tr class="odd">
<tr>
<td><code>I)</code></td>
<td>ordered, upper-roman-enumerated, followed by parenthesis</td>
</tr>
<tr class="even">
<tr>
<td><code>(I)</code></td>
<td>ordered, upper-roman-enumerated, enclosed in parentheses</td>
</tr>
<tr class="odd">
<tr>
<td><code>:</code></td>
<td>definition</td>
</tr>
<tr class="even">
<tr>
<td><code>- [ ]</code></td>
<td>task</td>
</tr>
Expand Down Expand Up @@ -1716,8 +1715,9 @@ <h3>Footnote</h3>
<h3>Block attributes</h3>
<p>To attach attributes to a block-level element, put the attributes on the
line immediately before the block. Block attributes have the same syntax
as inline attributes, but they must fit on one line. Repeated attribute
specifiers can be used, and the attributes will accumulate.</p>
as inline attributes, but if they don’t fit on one line, subsequent lines
must be indented. Repeated attribute specifiers can be used, and
the attributes will accumulate.</p>
<div class="example">
<div class="djot">
<pre><code>{#water}
Expand Down

0 comments on commit b0cfecd

Please sign in to comment.