File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { format } from "prettier";
33
44import { Language , Parser , Preferences } from "./types" ;
55
6- const readClipboard = async ( ) : Promise < string > => ( await Clipboard . readText ( ) ) || "" ;
6+ const readFromClipboard = async ( ) : Promise < string > => ( await Clipboard . readText ( ) ) || "" ;
77
88const formatCode = ( parser : Parser ) => {
99 const preferences = getPreferenceValues < Preferences > ( ) ;
@@ -12,7 +12,7 @@ const formatCode = (parser: Parser) => {
1212 return async ( query : string ) : Promise < string > => format ( query , { parser, printWidth } ) ;
1313} ;
1414
15- const copyClipboard = async ( code : string ) : Promise < string > => {
15+ const copyToClipboard = async ( code : string ) : Promise < string > => {
1616 await Clipboard . copy ( code ) ;
1717 return code ;
1818} ;
@@ -22,5 +22,5 @@ const wrapWithCodeblock = (language: Language) => {
2222} ;
2323
2424export const pipeline = async ( language : Language , parser : Parser ) : Promise < string > => {
25- return readClipboard ( ) . then ( formatCode ( parser ) ) . then ( copyClipboard ) . then ( wrapWithCodeblock ( language ) ) ;
25+ return readFromClipboard ( ) . then ( formatCode ( parser ) ) . then ( copyToClipboard ) . then ( wrapWithCodeblock ( language ) ) ;
2626} ;
You can’t perform that action at this time.
0 commit comments