Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 #4

Open
brunogaspar opened this issue Dec 4, 2014 · 2 comments
Open

2.0 #4

brunogaspar opened this issue Dec 4, 2014 · 2 comments

Comments

@brunogaspar
Copy link
Member

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>
@marcorivm
Copy link
Contributor

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

@brunogaspar
Copy link
Member Author

@marcorivm it's definitely something i will consider.

@cartalyst cartalyst deleted a comment from GrahamCampbell Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants