Skip to content

openwrt/luci: Convert 'should be <= xx characters long' output to Markdown #92

@ghost

Description

I've noticed that when a user does go over the character limit, the output shown to the user is a little confusing as the formatting code is not understood by Markdown:


Actual: line 2 is 136 characters long
$\textsf{Extend the port status view to include dynamically detected ethernet interf\color{red}{aces (e.g. USB adapters) in addition to board-defined ports.
}}$
Actual: line 4 is 153 characters long
$\textsf{Devices are derived from netifd's device map (port_map) and merged into the\color{red}{ existing port list if not already present. Loopback interfaces are excluded.
}}$
Actual: line 6 is 201 characters long
$\textsf{To ensure correct hotplug behaviour, the device list is filtered against th\color{red}{e current kernel device list obtained via /sys/class/net, preventing stale entries from being displayed after device removal.
}}$


If there was a way to convert that output to a Markdown friendly format, it may be easier for users to quickly see the error. Example converted output, using **~~ and ~~**:


Actual: line 2 is 136 characters long:

Extend the port status view to include dynamically detected ethernet interf aces (e.g. USB adapters) in addition to board-defined ports.

Actual: line 4 is 153 characters long:

Devices are derived from netifd's device map (port_map) and merged into the existing port list if not already present. Loopback interfaces are excluded.

Actual: line 6 is 201 characters long:

To ensure correct hotplug behaviour, the device list is filtered against th e current kernel device list obtained via /sys/class/net, preventing stale entries from being displayed after device removal.


Things to consider though:

  • If the actual commit content contains a slash, the Markdown will not be applied due to
  • **~~ must be added right before a character that isn't empty (space) or a slash /, and
  • ~~** must be added right after a character that isn't empty (space).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions