Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducasse authored Feb 4, 2024
1 parent 0b894ad commit f42f1be
Showing 1 changed file with 49 additions and 38 deletions.
87 changes: 49 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,7 @@
# Microdown Parser and Elements

I'm a parser for microdown implemented by S. Ducasse, L. Dargaud and G. Polito. The implementation is based on the work on markdown of K. Osterbye. Microdown is a smaller markdown but it is more extensible.
I'm a parser for microdown implemented by S. Ducasse, L. Dargaud and G. Polito. The implementation is based on the work on markdown of K. Osterbye. Microdown is a smaller markdown but it is more extensible. I contain a nice builder and some visitors.

## Quick start
### Loading specific version

To load the latest stable version load the master. If you have trouble loading in latest Pharo just execute the preloading.st script in the .github folder.
This script will remove exiting Microdown package and clear the system.

```Smalltalk
Metacello new
baseline: 'Microdown';
repository: 'github://pillar-markup/Microdown:master/src';
load.
```

### Loading latest development version
We are about to release a version 2.0.0 of Microdown with enhanced model, visitor.... no dependency with Pillar anymore.
It is used for example by the BeautifulComments project.

```Smalltalk
Metacello new
baseline: 'Microdown';
repository: 'github://pillar-markup/Microdown:dev/src';
onConflict: [ :ex | ex useIncoming ];
onUpgrade: [ :ex | ex useIncoming ];
load.
```

## Why should you use Microdown

Expand Down Expand Up @@ -55,27 +30,26 @@ But also

```
#Header
@anchor
% This is line comment
```language=Pharo&caption=Beautiful&label=Fig1
code
```
> Boring quote block
> Don't use me!
![Pharo is cool](http://pharo.org)
![Pharo is cool](http://pharo.org width=80&label=fig:pharo)
- list
1. ordered list
`in text` and for Pharo hyperlinks to class, method and package:
`Point`, `Point class`, `Point>>#setX:setY:`, `#’Microdown-Tests’ (for packages)
References: *@ref*
References: *@ref@*
```

## Full Syntax
Under writing...

### Headers
Similar to markdown headers are composed of `#` space text on one line.
Expand All @@ -101,28 +75,65 @@ Microdown offer the same code block that markdown but arguments can be specified
The following code is not able to display it because markdown quote block are strange and interpret nested block. So we cannot use quoteblock for quoting!

```
```language=pharo|label=code1|caption=this is my great piece of code
```language=pharo&label=code1&caption=this is my great piece of code
codeBlockMarkupString
^ '```'
```
```
````
```language=pharo|label=code1|caption=this is my great piece of code
```language=pharo&label=code1&caption=this is my great piece of code
codeBlockMarkupString
^ '\`\`\`'
```
````

More to come...

## Known limits

#### Math should be tested

#### Quote block
When a line starts with '> ' it delimits a quoteblock.
However the markup is not interpreted.
The markup is not interpreted.

#### Codeblock
Codeblock do not support more than for backticks.
Codeblock do not support more than four backticks.


## Development is in Pharo 11 and not in Pharo12!

Pay attention the development of Microdown __must not__ be in P12 else we cannot continue to develop Pillar and Microdown.
So for now we just ignore Pharo12 and Pharo12 can just load a tag version for example v2.4.2 (that we will produce with the removal of
buildMicroDownUsing moved to BeautifulComments).

### Loading specific version

To load the latest stable version load the master. If you have trouble loading in latest Pharo just execute the preloading.st script in the .github folder.
This script will remove exiting Microdown package and clear the system.

```Smalltalk
Metacello new
baseline: 'Microdown';
repository: 'github://pillar-markup/Microdown:master/src';
load.
```

The process is the following:
- Development in dev
- When stable dev -> in master
- When we can build books master is tagged.
- Then there is the Pharo integration but this is not the concerns of the Microdown team.


### Loading latest development version

```Smalltalk
Metacello new
baseline: 'Microdown';
repository: 'github://pillar-markup/Microdown:dev/src';
onConflict: [ :ex | ex useIncoming ];
onUpgrade: [ :ex | ex useIncoming ];
load.
```

## Implementation
I follow the design mentioned in [https://github.github.com/gfm](https://github.github.com/gfm), in particular the parsing strategy in appendix A.
Expand Down

0 comments on commit f42f1be

Please sign in to comment.