Skip to content
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

New REPL help mode display is broken by macros #1040

Open
gdalle opened this issue Aug 2, 2023 · 11 comments
Open

New REPL help mode display is broken by macros #1040

gdalle opened this issue Aug 2, 2023 · 11 comments

Comments

@gdalle
Copy link

gdalle commented Aug 2, 2023

Try the following in a Franklin page:

```?
@show
```
Some text

The text appears as a link

@tlienart
Copy link
Owner

tlienart commented Aug 2, 2023

Hmm

julia> fd2html("""
       ```?
       @show
       ```
       some text
       """);

julia> println(ans)
<pre><code class="language-julia-repl">help?> @show
</code></pre>
<div class="julia-help">
<pre><code>@show exs...</code></pre>
<p>Prints one or more expressions, and their results, to <code>stdout</code>, and returns the last result.</p>
<p>See also: <code>show</code>, <a href="@ref man-logging"><code>@info</code>, <code>println</code>.</p>
<h1>Examples</h1>
<pre><code class="language-julia-repl">julia&gt; x &#61; @show 1&#43;2
1 &#43; 2 &#61; 3
3

julia&gt; @show x^2 x/2;
x ^ 2 &#61; 9
x / 2 &#61; 1.5</code></pre>



</div>

<p>some text</p>

Could you share the full markdown of the page in which this appears?

@tlienart
Copy link
Owner

tlienart commented Aug 4, 2023

@gdalle did you guys figure this one and can I close it? or is it still causing troubles?

@gdalle
Copy link
Author

gdalle commented Aug 4, 2023

My friends can reproduce this. So you're most definitely not my friend 🤣

@gdalle
Copy link
Author

gdalle commented Aug 4, 2023

Let me cook up an MWE

@gdalle
Copy link
Author

gdalle commented Aug 4, 2023

For me it works even with this simple page

@def title = "MWE"

```?
@show
```
Some text

If it helps, the link "Some text" points to http://localhost:8000/pages/mwe/@ref%20man-logging

@gdalle
Copy link
Author

gdalle commented Aug 4, 2023

MWE.txt
This is really an HTML page but GitHub didn't like the format, so rename it before opening

@tlienart
Copy link
Owner

tlienart commented Aug 4, 2023

could you please try the latest commit on master and report if it fixed the issue? (basically the docstring has its own markdown and references which Franklin has to dance around and ignore, here it looks like a regex needed to be a bit more general)

@gdalle
Copy link
Author

gdalle commented Aug 4, 2023

sure, would you prefer if I switched to Xranklin for good? We had discussed it but I never did it

tlienart added a commit that referenced this issue Aug 4, 2023
tlienart added a commit to tlienart/Xranklin.jl that referenced this issue Aug 4, 2023
@tlienart
Copy link
Owner

tlienart commented Aug 4, 2023

you could but you'd be one of the early users and shifting from what you have will take some adjustments (for instance @def ... will work but are now deprecated in favour of +++ ... +++ blocks)

one advantage would be to have the ability to have per-page project which may be useful in your case.

@tlienart
Copy link
Owner

tlienart commented Aug 4, 2023

(I would certainly appreciate your feedback and you battle testing it though!)

@gdalle
Copy link
Author

gdalle commented Aug 4, 2023

per-page projects would be nice! I'll do that in a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants