Reputation: 4539
First time using Markdown
in a Laravel
project and it is not rendering as expected.
Here's my Markdown
@component('mail::message')
![{{ config('app.name') }}][logo]
[logo]: {{ asset(config('app.vars.logo_small')) }}
Subscription payment failure!
@component('mail::table')
| | |
| ---------------- | -------------------------------------------------------------------------- |
| Charge: | {{ $payment->stripe_currency }} {{ $payment->charge_fmt }} |
| Card: | {{ $payment->stripe_card_brand }} |
| Last 4: | {{ '∎∎∎∎ ∎∎∎∎ ∎∎∎∎ ' . $payment->stripe_card_last4 }} |
| Expiry: | {{ $payment->stripe_card_exp_month }}/{{ $payment->stripe_card_exp_year }} |
| Description: | {{ $payment->stripe_description }} |
@endcomponent
We tried to bill your subscription but were unable due to unavailable funds.
@endcomponent
But it renders like this:
LOGOIMG
Subscription payment failure!
<div class="table">
Charge: usd $10.42
Card: mastercard
Last 4: ∎∎∎∎ ∎∎∎∎ ∎∎∎∎ 4444
Expiry: 4/2044
Description: App Data plan - Regular - 28/04/2019-28/05/2019
We tried to bill your subscription but were unable due to unavailable funds.
Why is the <table>
HTML
tag showing. Thanks.
Upvotes: 0
Views: 2641
Reputation: 4539
I found the answer here. Essentially PHP Storm
is formatting it on copy n paste, and since it is Markdown
the spaces are being interpreted.
Upvotes: 2