Skip to content

Commit

Permalink
Move <html> lang setting to MiPage from MiPageSample
Browse files Browse the repository at this point in the history
Documentation update
  • Loading branch information
bpbecker committed Oct 6, 2016
1 parent fec776c commit d935212
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 10 deletions.
5 changes: 4 additions & 1 deletion Core/MiPage.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
:Access public
Head.Insert #._html.meta''('charset=',Charset)
:If ''OnLoad
Use'JQuery'
{0:: Use'JQuery'}''
:EndIf
bRenderBody
styles_Styles
Expand All @@ -68,6 +68,9 @@
:If ''OnLoad
b,(⎕NEW #._html.script('$(function(){',OnLoad,'});')).Render
:EndIf
:If 0Attrs['lang'] set the language for the page if not already set
{0:: {Set'lang="',,'" xml:lang="',,'" xmlns="http://www.w3.org/1999/xhtml"'}_Request.Server.Config.Lang}''
:EndIf
rRenderPage b
:If 0⎕NC'_Request.Response'
_Request.Response.HTMLr
Expand Down
Binary file added Documentation Sources/Configuring MiServer.docx
Binary file not shown.
Binary file added Documentation Sources/Configuring MiServer.pdf
Binary file not shown.
Binary file removed Documentation Sources/Installation.docx
Binary file not shown.
Binary file added Documentation Sources/Installing MiServer.docx
Binary file not shown.
Binary file added Documentation Sources/Installing MiServer.pdf
Binary file not shown.
3 changes: 0 additions & 3 deletions SampleMiSites/MS3/Code/Templates/MiPageSample.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@
});
});

set the language for the page
langserver.Config.Lang use the language specified in Server.xml
Set'lang="',lang,'" xml:lang="',lang,'" xmlns="http://www.w3.org/1999/xhtml"'
:Else
Head.Add _.StyleSheet'/Styles/sampleStyles.css'
Body.class'bodyblock'
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 6 additions & 4 deletions SampleMiSites/MS3/Examples/DC/MarkdownSimple.mipage
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
⍝ Control:: _DC.Markdown
⍝ Description:: Use markdown to generate HTML

∇ Compose
∇ Compose;markdown
:Access public
Add _.h3'The Markdown widget based on Kai Jaeger''s MarkAPL project'
Add'The following code produces the output below...'
Add CodeFollows
Add _.Markdown ScriptFollows
markdown←('{version}'(#.Strings.deb⍕,'MiServer uses' 'version' 'built on',⍪#.MarkAPL.Version))Subst ScriptFollows
⍝#### The Markdown widget processes "markdown"
⍝Markdown is a simple way to add formatting like headers, **bold text**, _italicized text_,\
⍝* bulleted
Expand All @@ -16,8 +16,10 @@
⍝ and so on, to plain text without having to use HTML markup.\
⍝ [Click here for more information on The MarkAPL Project](http://aplwiki.com/MarkAPL).

⍝ Click [here](http://aplwiki.com/MarkAPL) for more information on The MarkAPL Project.\
⍝ Click [here](/Examples/Data/MarkAPL.html) to view the MarkAPL documentation.\
⍝ MiServer uses {version}.
Add _.Markdown markdown
⍝<<end>>

Expand Down
22 changes: 21 additions & 1 deletion SampleMiSites/MS3/Examples/Data/MarkAPL.html
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,9 @@ <h5>3.1.8.2. The &ldquo;pound&rdquo; syntax (ATX)</h5>
<p>is converted into a header of level 1 while a line that looks like this:</p>
<pre><code>###### My caption</code></pre>
<p>is converted into a header of level 6. You cannot have headers of level 7 or higher (HTML does not allow this), and it is probably not a good idea to use levels beyond 4 anyway, except perhaps in technical documentation.</p>
<p>Many Markdown implementations do not require a space between the last <code>#</code> on the left and the content (= the header as such). However, the space was required even by the original Markdown specification. The CommonMark specification points out that this was actually a good idea because with the blank these two lines would be rendered as headers:</p>
<pre><code>#5 bolt</code></pre>
<pre><code>#hashtag</code></pre>
<p>Note that you may have trailing <code>#</code> characters as well; however, they are simply ignored. That's the reason why the number of characters does not even have to match the leading number of <code>#</code>.</p>
<a id="atx-versus-setext-syntax" class="autoheaderlink">
<h5>3.1.8.3. ATX versus SeText syntax</h5>
Expand Down Expand Up @@ -2578,6 +2581,22 @@ <h5>3.1.16.4. In-line mark-up in cells</h5>
</tbody>
</table>
<p>Note that one cell contains a pipe symbol (<code>|</code>); normally that would confuse the parser but not in this case because it is escaped with a backslash character: <code>\|</code>.</p>
<p>You can have a table with just column headers:</p>
<pre><code>|First name |Last Name|
|-|-A</code></pre>
<p>This is the result:</p>
<table>
<tbody>
<tr>
<td>First name</td>
<td>Last Name</td>
</tr>
<tr>
<td>-</td>
<td>-A</td>
</tr>
</tbody>
</table>
<a id="misc" class="autoheaderlink">
<h3>3.2. Misc</h3>
</a>
Expand Down Expand Up @@ -2850,6 +2869,7 @@ <h5>3.4.2.4. checkLinks</h5>
<h5>3.4.2.5. compileFunctions</h5>
</a>
<p>Boolean that defaults to 1. There is just one reason to prevent any function from being compiled: performance measurements.</p>
<p>However, with version 1.8.3 MarkAPL does not compile its functions anymore because this caused trouble under some circumstances while the performance gains are little.</p>
<a id="createfullhtmlpage" class="autoheaderlink">
<h5>3.4.2.6. createFullHtmlPage</h5>
</a>
Expand Down Expand Up @@ -3106,7 +3126,7 @@ <h3>5.3. Unexpected results</h3>
<p>Before reporting a bug please check carefully your Markdown, in particular when the problem appears in or after complex table or list definitions. More often than not mistakes in the Markdown are causing the problem.</p>
<p>If you cannot work out why it goes wrong report it to me &ndash; see the previous topic for how to report a problem.</p>
<hr>
<p>This document refers to version 1.8.2 of <strong><em>MarkAPL</em></strong>. Kai Jaeger ⋄ APL Team Ltd ⋄ 2016-07-03</p>
<p>This document refers to version 1.8.4 of <strong><em>MarkAPL</em></strong>. Kai Jaeger ⋄ APL Team Ltd ⋄ 2016-07-24</p>
<p>Footnotes</p>
<hr style="width:30%;margin-left:0;">
<div id="footnotes_div">
Expand Down
2 changes: 1 addition & 1 deletion SampleMiSites/MS3/Styles/sampleStyles.css
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ a:visited {
text-decoration: none;
}

pre {
#codeblock > pre {
font-size: medium;
overflow-x: auto;
max-width: 100%;
Expand Down

0 comments on commit d935212

Please sign in to comment.