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

Update Coradoc API for developers (not only reading from files) #134

Open
ronaldtse opened this issue Sep 23, 2024 · 0 comments
Open

Update Coradoc API for developers (not only reading from files) #134

ronaldtse opened this issue Sep 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

The current approach of Coradoc::Converter.convert is unusable by developers:

Coradoc::Converter.convert("input.html", "output.adoc", input_processor: :html, output_processor: :adoc)

Many users have a particular need to convert actual content and use it in Ruby:

# Parsing HTML into a Coradoc tree
cdoc = Coradoc::Input::Html.parse(html_string)
# Generating AsciiDoc from the Coradoc object
cdoc.to_adoc

This allows us to do things like this in the future:

# To Markdown
cdoc.to_md
@ronaldtse ronaldtse added the bug Something isn't working label Sep 23, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Sep 23, 2024
@ronaldtse ronaldtse moved this from 🆕 New to 🌋 Urgent in Metanorma Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🌋 Urgent
Development

No branches or pull requests

3 participants