Skip to content

Configurable attribute that instructs rdoc-markdown what to do with unknown_tags. #65

@skatkov

Description

@skatkov

This unknown_tags attribute should be configurable. I tried to hardcode it before, but I understood that depending on the environment, I want to have different values here.

  # Converts HTML string into a Markdown string with some cleaning and improvements.

  # FIXME: This could return string with newlines in the end, which is not good.
  def markdownify(input)
    # TODO: I should be able to set unknown_tags to "raise" for debugging purposes. Probably through rdoc parameters?
    # Allowed parameters:
    # - pass_through - (default) Include the unknown tag completely into the result
    # - drop - Drop the unknown tag and its content
    # - bypass - Ignore the unknown tag but try to convert its content
    # - raise - Raise an error to let you know

    html = normalize_rdoc_pre_blocks(input)

    md = ReverseMarkdown.convert(html, github_flavored: true)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions