Skip to content

Commit

Permalink
[config] whitespace trim right for description
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpoelen committed Oct 20, 2023
1 parent fec06ec commit 1cb350e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
12 changes: 6 additions & 6 deletions projects/redemption_configs/autogen/doc/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"name": "vault_transformation_rule",
"type": "str",
"value": "",
"description": "Account Mapping password retriever\nTransformation to apply to find the correct account.\n${USER} will be replaced by the user's login.\n${DOMAIN} will be replaced by the user's domain (in case of LDAP mapping).\n${USER_DOMAIN} will be replaced by the user's login + \"@\" + user's domain (or just user's login if there's no domain).\n${GROUP} will be replaced by the authorization's user group.\n${DEVICE} will be replaced by the device's name.\nA regular expression is allowed to transform a variable, with the syntax: ${USER:/regex/replacement}, groups can be captured with parentheses and used with \\1, \\2, ...\nFor example to replace leading \"A\" by \"B\" in the username: ${USER:/^A/B}\nEmpty value means no transformation rule.\n",
"description": "Account Mapping password retriever\nTransformation to apply to find the correct account.\n${USER} will be replaced by the user's login.\n${DOMAIN} will be replaced by the user's domain (in case of LDAP mapping).\n${USER_DOMAIN} will be replaced by the user's login + \"@\" + user's domain (or just user's login if there's no domain).\n${GROUP} will be replaced by the authorization's user group.\n${DEVICE} will be replaced by the device's name.\nA regular expression is allowed to transform a variable, with the syntax: ${USER:/regex/replacement}, groups can be captured with parentheses and used with \\1, \\2, ...\nFor example to replace leading \"A\" by \"B\" in the username: ${USER:/^A/B}\nEmpty value means no transformation rule.",
"rdp": true,
"vnc": true,
"jh": true,
Expand Down Expand Up @@ -408,7 +408,7 @@
"name": "allow_scale_factor",
"type": "bool",
"value": false,
"description": "Sends Scale & Layout configuration to the server.\nOn Windows 11, this corresponds to options Sclale, Display Resolution and Display Orientation of Settings > System > Display.\n⚠ Title bar detection via OCR will no longer work.\n",
"description": "Sends Scale & Layout configuration to the server.\nOn Windows 11, this corresponds to options Sclale, Display Resolution and Display Orientation of Settings > System > Display.\n⚠ Title bar detection via OCR will no longer work.",
"tags": ["compatibility"],
"globalSpec": true
},
Expand Down Expand Up @@ -442,7 +442,7 @@
"name": "tls_support",
"type": "bool",
"value": true,
"description": "Enable TLS between client and proxy.\n",
"description": "Enable TLS between client and proxy.",
"iniOnly": true
},
{
Expand Down Expand Up @@ -665,7 +665,7 @@
"name": "force_performance_flags",
"type": "PerformanceFlags",
"value": "-mouse_cursor_shadows,-theme",
"description": "It specifies a list of (comma-separated) RDP server desktop features to enable or disable in the session (with the goal of optimizing bandwidth usage).\n\nIf a feature is preceded by a \"-\" sign, it is disabled; if it is preceded by a \"+\" sign or no sign, it is enabled. Unconfigured features can be controlled by the RPD client.\n\nAvailable features:\n - wallpaper\n - full_window_drag\n - menu_animations\n - theme\n - mouse_cursor_shadows\n - cursor_blinking\n - font_smoothing\n - desktop_composition\n",
"description": "It specifies a list of (comma-separated) RDP server desktop features to enable or disable in the session (with the goal of optimizing bandwidth usage).\n\nIf a feature is preceded by a \"-\" sign, it is disabled; if it is preceded by a \"+\" sign or no sign, it is enabled. Unconfigured features can be controlled by the RPD client.\n\nAvailable features:\n - wallpaper\n - full_window_drag\n - menu_animations\n - theme\n - mouse_cursor_shadows\n - cursor_blinking\n - font_smoothing\n - desktop_composition",
"tags": ["perf","compatibility"],
"globalSpec": true,
"advanced": true
Expand Down Expand Up @@ -1181,7 +1181,7 @@
"name": "session_shadowing_support",
"type": "bool",
"value": true,
"description": "Enables Session Shadowing Support.\nSession probe must be enabled on target connection policy.\nTarget server must support \"Remote Desktop Shadowing\" feature.\nWhen enabled, users can share their RDP sessions with auditors who request it.\n",
"description": "Enables Session Shadowing Support.\nSession probe must be enabled on target connection policy.\nTarget server must support \"Remote Desktop Shadowing\" feature.\nWhen enabled, users can share their RDP sessions with auditors who request it.",
"globalSpec": true,
"advanced": true
},
Expand Down Expand Up @@ -2090,7 +2090,7 @@
"name": "encodings",
"type": "list",
"value": "",
"description": "Sets additional graphics encoding types that will be negotiated with the VNC server:\n 2: RRE\n 5: HEXTILE\n 16: ZRLE\n",
"description": "Sets additional graphics encoding types that will be negotiated with the VNC server:\n 2: RRE\n 5: HEXTILE\n 16: ZRLE",
"globalSpec": true,
"advanced": true,
"subtype": "int"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ R"gen_config_ini(## Config file for RDP proxy.
# Sends Scale & Layout configuration to the server.
# On Windows 11, this corresponds to options Sclale, Display Resolution and Display Orientation of Settings > System > Display.
# ⚠ Title bar detection via OCR will no longer work.
#
# (type: boolean (0/no/false or 1/yes/true))
#allow_scale_factor = 0
Expand All @@ -141,7 +140,6 @@ R"gen_config_ini(## Config file for RDP proxy.
#tls_fallback_legacy = 0
# Enable TLS between client and proxy.
#
# (type: boolean (0/no/false or 1/yes/true))
#tls_support = 1
Expand Down Expand Up @@ -296,7 +294,6 @@ R"gen_config_ini(## Config file for RDP proxy.
# - cursor_blinking
# - font_smoothing
# - desktop_composition
#
#_advanced
#force_performance_flags = -mouse_cursor_shadows,-theme
Expand Down Expand Up @@ -575,7 +572,6 @@ R"gen_config_ini(## Config file for RDP proxy.
# Session probe must be enabled on target connection policy.
# Target server must support "Remote Desktop Shadowing" feature.
# When enabled, users can share their RDP sessions with auditors who request it.
#
# (type: boolean (0/no/false or 1/yes/true))
#_advanced
#session_shadowing_support = 1
Expand Down Expand Up @@ -1148,7 +1144,6 @@ R"gen_config_ini(## Config file for RDP proxy.
# 2: RRE
# 5: HEXTILE
# 16: ZRLE
#
# (values are comma-separated)
#_advanced
#encodings =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ clipboard_down = boolean(default=False)
# Sets additional graphics encoding types that will be negotiated with the VNC server:
#     2: RRE
#     5: HEXTILE
# &nbsp; &nbsp; 16: ZRLE<br/><br/>
# &nbsp; &nbsp; 16: ZRLE<br/>
# (values are comma-separated)
#_advanced
encodings = string(default="")
Expand Down
4 changes: 4 additions & 0 deletions projects/redemption_configs/src/configs/generators/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2103,6 +2103,10 @@ struct GeneratorConfig

Names const& names = mem_info.name;
std::string_view desc = mem_info.desc;
// trim right
while (!desc.empty() && (desc.back() == ' ' || desc.back() == '\n')) {
desc.remove_suffix(1);
}

bool const has_spec = bool(mem_info.spec.dest);
bool const has_ini = has_spec
Expand Down

0 comments on commit 1cb350e

Please sign in to comment.