Skip to content

Add support for outputting to Asciidoc format #559

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

Conversation

Christopher-Chianelli
Copy link

Asciidoc is very similar to Markdown, but it has a few differences:

  • It uses = for headers instead of #
  • It uses multiple * for nested lists instead of indents
  • It uses \n'''\n for horizontal rule instead of ---\n
  • Blocks quotes in Asciidoc are done like this:
    ----
    QUOTED TEXT
    ACROSS MULTIPLE LINES
    ----
    versus how it done in Markdown
    > QUOTED TEXT
    > ACROSS MULTIPLE LINE

Due to these similarities, they basically share the exact same render code! The core implementation of MarkdownRender was moved to an abstract base class MarkdownRenderBase (with abstract methods for getting the symbols for LI, HR, etc.), with MarkdownRender now just defining those abstract methods. AsciidocRender also extends the same base class, and also overrides the blockquote method since blockquoting is done quite differently and is not a simple symbol replacement.

Asciidoc is very similar to Markdown, but it has a few differences:

- It uses `=` for headers instead of `#`
- It uses multiple `*` for nested lists instead of indents
- It uses `\n'''\n` for horizontal rule instead of `---\n`
- Blocks quotes in Asciidoc are done like this:
  ```
  ----
  QUOTED TEXT
  ACROSS MULTIPLE LINES
  ----
  ```
  versus how it done in Markdown
  ```
  > QUOTED TEXT
  > ACROSS MULTIPLE LINES
  ```

Due to these similarities, they basically share the exact same render code!
The core implementation of MarkdownRender was moved to an abstract base
class MarkdownRenderBase (with abstract methods for getting the symbols for
LI, HR, etc.), with MarkdownRender now just defining those abstract
methods. AsciidocRender also extends the same base class, and also
overrides the blockquote method since blockquoting is done quite
differently and is not a simple symbol replacement.
@westse
Copy link
Contributor

westse commented Aug 23, 2023

How about a CLI option and readme update?

@joschi
Copy link
Contributor

joschi commented Dec 16, 2023

Superseded by #569.

@joschi joschi closed this Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants