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

HTML Table in ReadMe Not Rendering in HTML Build #2117

Closed
ejmeitz opened this issue Apr 29, 2023 · 2 comments
Closed

HTML Table in ReadMe Not Rendering in HTML Build #2117

ejmeitz opened this issue Apr 29, 2023 · 2 comments

Comments

@ejmeitz
Copy link

ejmeitz commented Apr 29, 2023

I have the following HTML in my ReadMe and it renders beautifully; however, when I build with the deploydocs() function the < & > symbols don't get parsed as HTML and isntead get converted to &lt; and &rt; and my build ends up rendering the HTML as plain text. How can I fix this? I've copied the relevant parts of make.jl below. Any help would be greatly appreciated! I doubt this is a bug I just can't find the parameter I need to set to fix this.

ReadMe Version:

<table>
    <tr>
        <th>Crystal Family</th>
        <th align="center">Primitive</th>
        <th align="center">Base Centered</th>
        <th align="center">Body Centered</th>
        <th align="center">Face Centered</th>
    </tr>
...more stuff
\table>

Built Version:
&lt;table&gt; &lt;tr&gt; &lt;th&gt;

make.jl file

makedocs(sitename = "SimpleCrystals.jl",
format = Documenter.HTML(
    prettyurls = get(ENV, "CI", nothing) == "true"
), 
pages = [..stuff]
)

deploydocs(
    repo="github.com/ejmeitz/SimpleCrystals.jl.git",
    push_preview = true,
    devbranch = "main"
)
@fredrikekre
Copy link
Member

Crossref #674 and references therein.

@odow
Copy link
Collaborator

odow commented Nov 1, 2023

I think this is actually asking for #517

The answer for @ejmeitz is to wrap the table in @raw html block

```@raw html
<table>
    <tr>
        <th>Crystal Family</th>
        <th align="center">Primitive</th>
        <th align="center">Base Centered</th>
        <th align="center">Body Centered</th>
        <th align="center">Face Centered</th>
    </tr>
...more stuff
\table>
```

Closing because Documenter does not support HTML syntax outside a @raw html block.

@odow odow closed this as completed Nov 1, 2023
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

3 participants