diff --git a/src/attr_line.hh b/src/attr_line.hh index 48d8e12c..938a10eb 100644 --- a/src/attr_line.hh +++ b/src/attr_line.hh @@ -364,7 +364,7 @@ public: static inline attr_line_t from_ansi_str(const char *str) { attr_line_t retval; - return retval.with_ansi_string(str); + return retval.with_ansi_string("%s", str); }; /** @return The string itself. */ diff --git a/test/expected_help.txt b/test/expected_help.txt index 260d18d0..c3a8b9d4 100644 --- a/test/expected_help.txt +++ b/test/expected_help.txt @@ -1262,7 +1262,7 @@ Example Synopsis like(pattern, str, escape) -- Match a string against a pattern Parameters - pattern The pattern to match. A percent symbol () will match zero or more + pattern The pattern to match. A percent symbol (%) will match zero or more characters and an underscore (_) will match a single character. str The string to match escape The escape character that can be used to prefix a literal percent @@ -1382,7 +1382,7 @@ Examples Synopsis printf(format, X) -- Returns a string with this functions arguments substituted into the given format. Substitution points are specified using - percent () options, much like the standard C printf() function. + percent (%) options, much like the standard C printf() function. Parameters format The format of the string to return. X The argument to substitute at a given position in the format.