From f42f1be48dd26a7958f3bbee2e66f42b9cccd684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sun, 4 Feb 2024 21:43:23 +0100 Subject: [PATCH] Update README.md --- README.md | 87 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 8d3afcd1..36f2cc3e 100644 --- a/README.md +++ b/README.md @@ -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 @@ -55,15 +30,14 @@ 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 @@ -71,11 +45,11 @@ But also `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. @@ -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.