Skip to content

Commit

Permalink
Improve auto placeholder behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Sep 26, 2023
1 parent c30f904 commit fe9e6ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/settingparser.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function json_values(Si $si, SettingValues $sv) {

/** @return ?string */
function placeholder(Si $si, SettingValues $sv) {
return null;
return "auto";
}

/** @return ?string */
Expand Down
5 changes: 2 additions & 3 deletions src/si.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,8 @@ function json_values($sv) {
* @return ?string */
function placeholder($sv) {
if ($this->placeholder === "auto"
&& $this->parser_class
&& ($v = $sv->si_parser($this)->placeholder($this, $sv)) !== null) {
return $v;
&& $this->parser_class) {
return $sv->si_parser($this)->placeholder($this, $sv);
} else {
return $this->placeholder;
}
Expand Down

0 comments on commit fe9e6ea

Please sign in to comment.