Skip to content

Commit

Permalink
Image Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
santanche authored May 11, 2019
1 parent 2ccf634 commit a38565d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/adonisjs/public/translator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,28 @@ Markdown text that does not match to any expression.
}
```

## Image
### Markdown to Object
* Sentence: `!\[alt-text\]([path] "[title]")`
* Expression: `!\[([\w \t]*)\]\(([\w:.\/\?&#\-]+)[ \t]*(?:"([\w ]*)")?\)`
* Group #1: alt text
* Group #2: image path
* Group #3: image title
![Image Expression](expressions/image.png)
* Object:
```
{
type: "image"
alt: <alt text>
path: <image path>
title: <image title>
}
```
### Object to HTML
```
<img src="[server][path]" alt="[title]">
```

## Option
### Markdown to Object
* Sentence: `+ [label] ([rule]) -> [target]` or `* [label] ([rule]) -> [target]`
Expand Down

0 comments on commit a38565d

Please sign in to comment.