What are the proper liquid tags for CODE and PRE

in this example the raw tag has nothing to escape so why is it there?

I know there is no liquid but the input is:

<p class="list-1">&bull;&nbsp; <code>-cp-general:<codepage></code> where is either utf8 or a <a href="14-whatsnew.html#Languages">codepage number</a>. NOTE: It should not be necessary to override this.</p>

And the output is:

The word <codepage> is gone. All of the words in the <> are missing in the examples I showed above.

This HTML

<p>Testing Text in an HTML document</p>
<p class="list-1">&bull;&nbsp; <code>-cp-general:<codepage></code> where is either utf8 or a <a  href="14-whatsnew.html#Languages">codepage number</a>. NOTE: It should not be necessary to override this.</p>
<p class="list-1">&bull;&nbsp; <code>-<gamemode></code> Specifies which game mode to use. <code><gamemode></code> can be any of the following: ['tes5vr', 'fo4vr', 'tes4', 'tes5', 'enderal', 'sse', 'fo3', 'fnv', 'fo4', 'fo76'] Example <code>-fo76</code> for Fallout 76.</p>
<p class="list-1">&bull;&nbsp; <code>-C:<path></code> path to use for cache files</p>
<p class="list-1">&bull;&nbsp; <code>-R:<path><filename></code> Custom xEdit Log Filename</p>
<p class="empty">&nbsp;</p>
<pre>
Alternatively, the <code><codepage></code> for translatable strings can now be overridden by placing the text `<cp:xxxx>` somewhere in the description (in the file header) of the module. `xxxx` can be `utf8` or any valid <code><codepage></code> number, e.g. `1252`. codepages with less than 4 digits must use leading 0s, e.g. `<cp:0930>`.
</pre>

Should not produce this:

it is missing everything inside the <> hence why I am trying to figure out why that’s missing.

I don’t care if it’s {% raw %}{% endraw %} or {% rawtext %}{% endrawtext %} or whatever it needs to be, is there anything so that when symbols such as !@#%^&*(){}[]:;"'<>,.?/ are inside of `<code></code>` that they will not be hidden? Because when there are words inside the `<>` they don't show up. I don't want to have to make a list of all the posible symbols !@#%^&*(){}[]:;"’<>,.?/ that have to be converted to

&commat;&num;&dollar&percnt;&Hat;&amp;&ast;&lpar;&rpar;&lcub;&rcub;&lsqb;&rsqb;&colon;&semi;&quot;&apos;&lt;&gt;&comma;&period;&quest;&sol;

interesting, still think there are multiple issues, I kinda think the {{ and {% are going to be ok with the raw tag, though that is probably a pain.

This other example with <codepage> is interesting, I did a test on it and in the browser if you view the source - not the inspector - actually view source, it is correct - right?

image

Still looking at it but it almost seems like a browser issue.

If you go look at your rendered html files do they look correct?

[edit - this is not interesting, need to use highlight to be able to write random tags as text, see below]

I will go to the _site folder and look but yes I do believe they have what I put in the HTML

have you tried the highlight tag?

{% highlight python %}-cp-general:<codeadge>{% endhighlight %}

this basically what the back ticks in markdown do, much easier to write than highlight.
The Pre and Code are just styling, they do not allow you to actually escape tags.

And unfortunately even though there is a syntax highlighter for python it runs after liquid so you still have to use the raw tag for {{ or {%.

This is what is in the root folder that Jekyll is processing

This is from the _site folder

No but I will try it and see what happens. Because in the end it doesn’t really matter how it works, although it should be a less convoluted process with having to hack things like this.

the last part of this is new to me and may work well for you if you are not using liquid anywhere on the page:

If you are using a language that contains curly braces, you will likely need to place {% raw %} and {% endraw %} tags around your code. Since 4.0 you can add render_with_liquid: false in your front matter to disable Liquid entirely for a particular document.

Correct it sorta works for the curly braces

It’s not working for the pre and code blocks though

Here is what happens. Basically Jekyll silently fails after you try to do something it doesn’t like.

image

That doesn’t mean that there is any issue with the host machine or there is an issue with webrick.

It means something in the HTML is invalid and Jekyll doesn’t like it.

if I put this

{% highlight python %)
Alternatively, the codepage for translatable strings can now be overridden by placing the text `<cp:xxxx>` somewhere in the description (in the file header) of the module. `xxxx` can be `utf8` or any valid codepage number, e.g. `1252`. codepages with less than 4 digits must use leading 0s, e.g. `<cp:0930>`.
{% endhighlight %}

and then test with this

{% highlight python %)<pre>
Alternatively, the codepage for translatable strings can now be overridden by placing the text `<cp:xxxx>` somewhere in the description (in the file header) of the module. `xxxx` can be `utf8` or any valid codepage number, e.g. `1252`. codepages with less than 4 digits must use leading 0s, e.g. `<cp:0930>`.
</pre>{% endhighlight %}

Then I get this output

Which makes me go, “oh man I guess I can’t do that, well I’ll just remove the pre tags.” However, once I do it Jekyll has already decided it does not like that syntax and no matter how many times I change the HTML file or refresh the page Jekyll will no longer process the file at all. It just decides to pout and do nothing.

no need for pre or code when using highlight as it is adding them for you.

I had some type somewhere. Let me try that a bit more in other places.

It works great for replacing the pre tags but not the code tags that are in the middle of the sentence.

I appreciate you trying to help but I think I just have to make another function in Python to look for all the code and pre blocks and then convert these symbols:

@#$%^&*(){}[]:;"'<>,.?/

To This:

&commat;&num;&dollar;&percnt;&Hat;&amp;&ast;&lpar;&rpar;&lcub;&rcub;&lsqb;&rsqb;&colon;&semi;&quot;&apos;&lt;&gt;&comma;&period;&quest;&sol;

So that I don’t have to deal with it anymore. Thanks anyway.

really recommend markdown for what you are doing, you can probably do whatever other css you need with markdown.

Markdown would work the same way this forum does, so you can do single back ticks to highlight just one word which is what a lot of what it looks like you are doing has. Triple back ticks apply it to a larger block.

So you could write

'<codepage>` does whatever

vs having to use the highlight tag with html like:

{% highlight python %}<codepage> {% endhighlight %} does whatever

sounds good, good luck.