mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 06:27:19 +01:00
add prettier and format all
This commit is contained in:
@@ -1,30 +1,29 @@
|
||||
function convertLineBreaks(string) {
|
||||
return string.replace(/\n/g, '\\\\');
|
||||
};
|
||||
return string.replace(/\n/g, '\\\\')
|
||||
}
|
||||
|
||||
export function brief(options) {
|
||||
const {
|
||||
template = 'brief-fam',
|
||||
subject = '',
|
||||
yourRef = '',
|
||||
yourRefName = 'Ihr Zeichen',
|
||||
yourMail = '',
|
||||
myRef = '',
|
||||
customer = '',
|
||||
invoice = '',
|
||||
date = '\\today',
|
||||
signature = '',
|
||||
specialMail = '',
|
||||
address = 'Max Mustermann\\\\Musterstrasse\\\\12345 Musterstadt',
|
||||
opening = 'Sehr geehrte Damen und Herren',
|
||||
body = '',
|
||||
closing = 'Mit freundlichen Grüßen',
|
||||
ps = '',
|
||||
enclosing = '',
|
||||
} = options
|
||||
|
||||
const {
|
||||
template = 'brief-fam',
|
||||
subject = '',
|
||||
yourRef = '',
|
||||
yourRefName = 'Ihr Zeichen',
|
||||
yourMail = '',
|
||||
myRef = '',
|
||||
customer = '',
|
||||
invoice = '',
|
||||
date = '\\today',
|
||||
signature = '',
|
||||
specialMail = '',
|
||||
address = 'Max Mustermann\\\\Musterstrasse\\\\12345 Musterstadt',
|
||||
opening = 'Sehr geehrte Damen und Herren',
|
||||
body = '',
|
||||
closing = 'Mit freundlichen Grüßen',
|
||||
ps = '',
|
||||
enclosing = '',
|
||||
} = options;
|
||||
|
||||
return `% brief document
|
||||
return `% brief document
|
||||
\\documentclass{scrlttr2}
|
||||
\\LoadLetterOption{${template}}
|
||||
|
||||
@@ -56,5 +55,5 @@ export function brief(options) {
|
||||
%\\encl{${enclosing}}
|
||||
|
||||
\\end{letter}
|
||||
\\end{document}`;
|
||||
};
|
||||
\\end{document}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user