Skip to content

Commit ad2eaf7

Browse files
committed
formatting
1 parent 970c722 commit ad2eaf7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Illuminate/Mail/Mailable.php

+13-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ protected function buildMarkdownView()
192192

193193
return [
194194
'html' => $markdown->render($this->markdown, $data),
195-
'text' => isset($this->textView) ? $this->textView : $markdown->renderText($this->markdown, $data),
195+
'text' => $this->buildMarkdownText(),
196196
];
197197
}
198198

@@ -214,6 +214,18 @@ public function buildViewData()
214214
return $data;
215215
}
216216

217+
/**
218+
* Build the text view for a Markdown message.
219+
*
220+
* @return string
221+
*/
222+
protected function buildMarkdownText()
223+
{
224+
return isset($this->textView)
225+
? $this->textView
226+
: $markdown->renderText($this->markdown, $data);
227+
}
228+
217229
/**
218230
* Add the sender to the message.
219231
*

0 commit comments

Comments
 (0)