Skip to content

Inline code language #626

Open
Open

Description

@ioquatix

I'd like to propose an extension that looks like this:

Ruby code: `Object.new`:ruby
Ruby code with extended info: `Object.new`:"ruby lineno=5"

When an inline code block is followed directly by a colon and a non-whitespace character, it gets used for the language.

In addition, some minor internal normalization to the API (don't call it code fence, rather, code info, which makes more sense).

See socketry#1 for a proposed implementation.

Activity

  1. ioquatix commented on Aug 18, 2026

    @ioquatix
    ContributorAuthor

    @jgm any thoughts on moving this forward?

  2. ioquatix commented on Aug 20, 2026

    @ioquatix
    ContributorAuthor

    After considering this again, I think I prefer

    Create a new object using ruby:`Object.new`
    
    
  3. gemmaro commented on Sep 10, 2026

    @gemmaro

    Hi, maybe talk.commonmark.org is the right place to discuss a new syntax, according to:

    There is a forum for discussing CommonMark; you should use it instead of github issues for questions and possibly open-ended discussions. Use the github issue tracker only for simple, clear, actionable issues.

    I did a quick search and found this thread, for instance.

  4. ioquatix commented on Sep 10, 2026

    @ioquatix
    ContributorAuthor

    I ended up implementing support for

    ruby:`Object.new`

    syntax, where it is $language:`code`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions