interpret icon indicating copy to clipboard operation
interpret copied to clipboard

2.0

Open brunogaspar opened this issue 10 years ago • 2 comments

The current Interpreter api is limited and we can't do a lot with it.

The following is a concept for the 2.0 version

From HTML to Markdown

$content = '<h1>Foo</h1>';

Interpreter::make($content)->fromHtml()->toMd();
// The toMd() can be used as toMarkdown() as well, as it will be aliased as it's now

> # Foo

From Markdown to HTML

$content = '# Foo';

Interpreter::make($content)->fromMd()->toHtml();
// The fromMd() can be used as fromMarkdown() as well, as it will be aliased as it's now

> <h1>Foo</h1>

From HTML to Textile

$content = '<h1>Foo</h1>';

Interpreter::make($content)->fromHtml()->toTextile();

> h1.Foo

From Textile to HTML

$content = 'h1.Foo';

Interpreter::make($content)->toTextile()->fromHtml();

> <h1>Foo</h1>

brunogaspar avatar Dec 04 '14 23:12 brunogaspar

What's the state of support for CommonMark Spec?? http://commonmark.org/

marcorivm avatar Dec 25 '14 19:12 marcorivm

@marcorivm it's definitely something i will consider.

brunogaspar avatar Dec 29 '14 04:12 brunogaspar