Skip to content

Missing spacing in ui.code without language specification #5264

@rolfn

Description

@rolfn

First Check

  • I added a very descriptive title here.
  • This is not a Q&A. I am sure something is wrong with NiceGUI or its documentation.
  • I used the GitHub search to find a similar issue and came up empty.

Example Code

#!/usr/bin/env python3
from nicegui import ui

ui.code('''
    from nicegui import ui

    ui.label('Code inception!')

    ui.run()
''').classes('w-full')

ui.code('''
    from nicegui import ui

    ui.label('Code inception!')

    ui.run()
''', language='').classes('w-full')

ui.run()

Description

Occasionally, language highlighting isn't desired, so I specify language=''. This works, but then the margins are missing.

NiceGUI Version

3.0.4

Python Version

3.11.13

Browser

Firefox

Operating System

Linux

Additional Context

Occasionally, language highlighting isn't desired, so I specify language=''. This works, but then the margins are missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugType/scope: A problem that needs fixingreviewStatus: PR is open and needs review

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions