Skip to content

Commit

Permalink
Correction of example snippet for changing text to title case (hluk#2028
Browse files Browse the repository at this point in the history
)

* Corrected syntax of snippet for title case

* Correct indentation of code block.
  • Loading branch information
viharm authored Jun 28, 2022
1 parent 895eef6 commit 5330a01
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions docs/command-examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -574,19 +574,23 @@ Change Copied Text to Title Case
.. code-block:: ini
[Command]
Name=Paste as title case
Command="
copyq:
copyq:
function toTitleCase(str) {
return str.replace(
/\w\S*/g,
/\\w\\S*/g,
function(txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
}
);
}
copy(toTitleCase(str(input())))
paste()"
GlobalShortcut=meta+ctrl+e
Icon=\xf034
Name=Title Case
paste()
"
Input=text/plain
IsGlobalShortcut=true
HideWindow=true
Icon=\xf15b
GlobalShortcut=meta+ctrl+t

0 comments on commit 5330a01

Please sign in to comment.