Skip to content

Options Example Codeblocks have no Syntax Highlighting #189

Description

@snoweuph

Currently all examples in options are rendered without Syntax Highlighting.

I noticed this in NVF on: https://github.com/NotAShelf/nvf/pull/1604|

you can't also just use litteralMD as a workaround in the examples

Image
{
description = ''
  The queries scm script.

  Example:
  ```nix
  {
    query = '''
      ;; extends

      ((apply_expression
        function: (variable_expression
          name: (identifier) @_func
          (#eq? @_func "mkLuaInline"))

        argument: (indented_string_expression
          (string_fragment) @injection.content)

        (#set! injection.language "lua")
        (#set! injection.combined)))
    ''';
  }
  ```
'';
example = literalMD ''
  ```nix
  {
    query = '''
      ;; extends

      ((apply_expression
        function: (variable_expression
          name: (identifier) @_func
          (#eq? @_func "mkLuaInline"))

        argument: (indented_string_expression
          (string_fragment) @injection.content)

        (#set! injection.language "lua")
        (#set! injection.combined)))
    ''';
  }
  ```
'';
}

Activity

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