Skip to content

Interpolate pieces of highlighted code with specific html tags #135

Closed
@brodock

Description

I would like to ask if it's possible in any feasible way to preserve specific "html" tags inside the original code.

What I want to do is to "annotate" source-code with specific tags, to be used on slides. As an example, I would like to use "< mark >def x< /mark >" to be able to style background around the generated "def x" highlighted part:

class A
  def x
  end
end

I know that something similar to that is possible with highlightjs (you have to use span), so I'm asking if it's on the scope of rouge to support it (probably as a advanced hack or a optional flag).

This can also be useful to the folks highlighting pieces of code on blog posts.

Metadata

Assignees

No one assigned

    Labels

    stale-issueThere has been no activity for a year.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions