Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/gh-pages' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ridgeworks committed Jun 28, 2016
2 parents 575859e + fbef401 commit 020938a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
16 changes: 8 additions & 8 deletions MyWordLingo.myw
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ First, labels may be defined to directly represent the corresponding HTML elemen
:h3 Header 3

&
:h2 = prose <h2>
:h3 = prose <h3>
:h2 = <h2>
:h3 = <h3>

The HTML headers :h1 to :h6 can all be befined the same way.

Expand All @@ -71,8 +71,8 @@ Labels can also be defined to mimic the Markdown notations:
### Header 3

&
## = prose <h2>
### = prose <h3>
## = <h2>
### = <h3>

The header text is usually a single short line, but a block label can have multiple indented lines of content:

Expand All @@ -81,7 +81,7 @@ The header text is usually a single short line, but a block label can have multi
A Silly Long Header
That Keeps On Going

A more elaborate header may include the header text as an ID to enable HTML links to refer to it:
A more elaborate header defintion could include the header text as an ID to enable HTML links to refer to it:

.demo
### Some Topic
Expand All @@ -97,9 +97,9 @@ Style rules can present headers in different ways, for example with a border lin
A simple horizontal rule may also be used:

.demo
___ ___
--- ...

& ___ = <hr/>
& --- = <hr/>

An empty element has no content, but a markup label with an empty content block is not seen as an offset label, so some content is needed. The content of an empty label is not presented, it can be used for comments.

Expand Down Expand Up @@ -496,7 +496,7 @@ The `[array] transform is defined in the core lingo, so authors may define custo
.lunch tr:nth-child(1) { font-weight:bold; background:whitesmoke; }
.lunch td:nth-child(4) { text-align:right; }

font-weight:bold; background:whitesmoke;


### Custom HTML

Expand Down
8 changes: 3 additions & 5 deletions MyWordRef.myw
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ A document can import a lingo file by using a `[@import file-url] instruction:
.eg
& @import my-lingo.mmk

The ~[.mmk] suffix indicates a meta-markup file type. This file type contains label definitions just as if they are inside a & block:
The `[.mmk] suffix indicates a meta-markup file type. This file type contains label definitions just as if they are inside a `[&] block:

.file file: my-lingo.mmk
.body
Expand Down Expand Up @@ -587,7 +587,7 @@ Here is the grammar that defines the `[array] transform:
.eg
&
array := row* :: (rows) => this.flatten(rows).join('')
row := tsep* cell* nl? :: (_,cell) => ["<tr>",cell,"</tr>"]
row := tsep* cell* nl? :: (_,cells) => ["<tr>",cells,"</tr>"]
cell := item tsep? :: (item) => ["<td>",markit('prose',this.flatten(item).join('')),"</td>"]
item := (!delim char)+
delim :~ %tsep | %nl
Expand All @@ -597,7 +597,7 @@ Here is the grammar that defines the `[array] transform:

&
array := row* :: (rows) => this.flatten(rows).join('')
row := tsep* cell* nl? :: (_,cell) => ["<tr>",cell,"</tr>"]
row := tsep* cell* nl? :: (_,cells) => ["<tr>",cells,"</tr>"]
cell := item tsep? :: (item) => ["<td>",markit('prose',this.flatten(item).join('')),"</td>"]
item := (!delim char)+
delim :~ %tsep | %nl
Expand Down Expand Up @@ -670,8 +670,6 @@ Third party translators that are available as a JavaScript function can be used

The `[@import] loads the Markdown translator as JavaScript from the file `[marked.js]. The `[.md] label is defined to use this translator. The `[import] transform sees the `[.md] label that matches the file suffix and translates the file as Markdown by using the `[marked] transform function. The `[@import] instruction can also be used to import a CSS style sheet from a file with a `[.css] suffix.

The


## Translating MyWord Documents

Expand Down

0 comments on commit 020938a

Please sign in to comment.