mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
commit
c5df39daf4
3 changed files with 15 additions and 10 deletions
|
@ -556,8 +556,13 @@ pub fn fmt_str_literal<'buf>(buf: &mut Buf<'buf>, literal: StrLiteral, indent: u
|
||||||
|
|
||||||
for segments in lines.iter() {
|
for segments in lines.iter() {
|
||||||
for seg in segments.iter() {
|
for seg in segments.iter() {
|
||||||
buf.indent(indent);
|
// only add indent if the line isn't empty
|
||||||
format_str_segment(seg, buf, indent);
|
if *seg != StrSegment::Plaintext("\n") {
|
||||||
|
buf.indent(indent);
|
||||||
|
format_str_segment(seg, buf, indent);
|
||||||
|
} else {
|
||||||
|
buf.newline();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buf.newline();
|
buf.newline();
|
||||||
|
|
|
@ -6,7 +6,7 @@ Hello,\n\nWorld!
|
||||||
c =
|
c =
|
||||||
"""
|
"""
|
||||||
Hello,
|
Hello,
|
||||||
|
|
||||||
World!
|
World!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -574,7 +574,7 @@ formatHelpHelp = \n, cmdHelp ->
|
||||||
"\n\n"
|
"\n\n"
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
\(indented)COMMANDS:
|
\(indented)COMMANDS:
|
||||||
\(fmtCmdHelp)
|
\(fmtCmdHelp)
|
||||||
"""
|
"""
|
||||||
|
@ -606,7 +606,7 @@ formatHelpHelp = \n, cmdHelp ->
|
||||||
|> Str.joinWith "\n"
|
|> Str.joinWith "\n"
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
\(indented)OPTIONS:
|
\(indented)OPTIONS:
|
||||||
\(helpStr)
|
\(helpStr)
|
||||||
"""
|
"""
|
||||||
|
@ -621,7 +621,7 @@ formatHelpHelp = \n, cmdHelp ->
|
||||||
|> Str.joinWith "\n"
|
|> Str.joinWith "\n"
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
\(indented)ARGS:
|
\(indented)ARGS:
|
||||||
\(helpStr)
|
\(helpStr)
|
||||||
"""
|
"""
|
||||||
|
@ -909,7 +909,7 @@ expect
|
||||||
==
|
==
|
||||||
"""
|
"""
|
||||||
test
|
test
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
--foo the foo option (string)
|
--foo the foo option (string)
|
||||||
--bar, -B (string)
|
--bar, -B (string)
|
||||||
|
@ -936,13 +936,13 @@ expect
|
||||||
==
|
==
|
||||||
"""
|
"""
|
||||||
test
|
test
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
login
|
login
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
--user (string)
|
--user (string)
|
||||||
--pw (string)
|
--pw (string)
|
||||||
|
|
||||||
publish
|
publish
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
--file (string)
|
--file (string)
|
||||||
|
@ -960,7 +960,7 @@ expect
|
||||||
"""
|
"""
|
||||||
test
|
test
|
||||||
a test cli app
|
a test cli app
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
login
|
login
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue