-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable interpolation #35
Conversation
Thank you @phannaly for your contributions 👻. However, I tried this PR, but it seems doesn't solve the problem completely I mean the blade syntax still not rendering! 🧐 |
@saleem-hadad Have you try rebuilt the assets? |
Seems work perfectly for me. if you still have problem, I will check my PR again. |
Yes correct that what I got also, but this doesn't seem to solve the issue completely (only half of it), because what they are trying to do is to render the blade syntax now showing it as text |
ah! sorry I missed the point. I will check it tonight. |
Thank you dude for your help and contribution :D |
@saleem-hadad can you check these commit again? |
Thank you @phannaly so much for your contribution. It works now 👻🔥 |
@saleem-hadad That's okay I just realized I missed unit test. |
Just add unit test for check and render blade syntax. |
Amazing ❤️😍 |
@saleem-hadad @phannaly are you sure this has been resolved? When using 1.2.5 and this markdown.. I get the blade error However when I then I use the blade escape e.g Yes blade ignores it - however Vue still tries to parse it. The HTML that it outputs is <pre><code class="language-php">Hello {{ $example }}</code></pre> |
Hi @OwenMelbz Did you already pass $example variable to your markdown file? |
No because it's documentation giving examples :D I want the documentation to show users how to do things, and this instance the documentation is explaining how to do something that uses blade syntax with an example variable |
@OwenMelbz You have to pass your $variable from |
@phannaly This doesn't make sense. This package is for Writing documentation. It becomes useless if you try parse the code, meaning people cannot write code examples. -- For example, lets just say you were trying to inform your users how to pass data from a controller to your view, you might write something like... (using laravel as an example). Please imagine below is the documentation I want to write: EXAMPLE STARTFirst you need to set up your route e.g. Route::get('/', 'HomeController'); Once you've defined your route, you can make your controller e.g. <?php
namespace App\Http\Controllers;
class HomeController
{
public function __invoke()
{
return view('home')->with('message', 'Hello World');
}
} Now within your blade template e.g. @extends('layout.app')
@section('content')
<h1>{{ $message }}</h1>
@endsection EXAMPLE ENDYou can see here that I'm simply describing how to display a variable in blade. What you're saying is that I need to pass a variable from the controller to the docs... this doesn't make sense. Hopefully you understand why this is wrong. Thanks |
@OwenMelbz That's why I ask creator to create docs. |
@phannaly but how can we now do the above? It was working before the PR was merged I believe |
@saleem-hadad what’s going on with this please? We’ve just spent ages writing our docs in your tool, loving the product, now it’s currently unusable and really hoping you can find a solution :( |
sorry guys I didn't get notification about what's going on here |
I'll check now |
Is that what you're looking for? @OwenMelbz it works by writing the docs like this It's a quick solution for now till we find a better one for sure |
I used the latest version v1.2.5 |
@saleem-hadad Maybe something else is needed to get this working on existing projects? e.g. This is our composer installed versoin
This is a markdown file
This is the error -- @saleem-hadad Perhaps I could share the code-base with you privately to see if you can replicate? |
@OwenMelbz no problem I'd be happy to help 😇 and make sure you publish the new assets
If noting works, add me to the repo temporarly to try fixing the issue. |
Publishing the new assets seemed to be the fix here! After that it worked as expected :P Was that listed somewhere that I missed, or does it need adding? Thanks :) |
Cool, sounds great 😍 Yead dude, it's mentioned in the upgrade section |
Disable interpolation to allow
{{
}}
syntax in markdown.This PR will fix #28