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

issue with hyde tags <!-- Hyde::...::Begin--> and restructured text (and possibly textile and asciidoc) #14

Open
solsticedhiver opened this issue Feb 4, 2010 · 6 comments
Labels

Comments

@solsticedhiver
Copy link

restructuredtext does not recognise html statement and treat them like text. you have to include them in a raw paragraph like that:

.. raw:: html
   

so that there are outputted like html.

so this cause problem when you use _restructuredtex_t and you have {% article %} or {%excerpt %} tag in the middle of a {% restructuredtext %} block because all the html comment HYDE tag are rendered in html.
For example:

{% block article %}
{% restructuredtext %}
{% article %}
{% excerpt %}
This is a test
{% endexcerpt %}
This should show how article and excerpt (django) tags normally rendered in html comment are shown in plain html while inside restructuredtext block
{% endarticle %}
{% endrestructuredtext %}
{% endblock article %}

is rendered in html as :

<p>&lt;!-- Hyde::Article::Begin&nbsp;--&gt;</p> 
<p>&lt;!-- Hyde::Excerpt::Begin&nbsp;--&gt;</p> 
<p>This is a test
&lt;!-- Hyde::Excerpt::End --&gt;
This should show how article and excerpt (django) tags normally rendered in html   comment are shown in plain html while inside restructuredtext block
&lt;!-- Hyde::Article::End&nbsp;--&gt;</p> 

one have to use {% restruturedtext %} block at lowest level possible and use article and excerpt blocks on the outer level of restructured text block.

i guess that the same problem could be find with textitle and asciidoc if they can't recognize html statement and do treat them like text.

@JoshRosen
Copy link

About a year ago I ran into a related issue with reStructuredText and excerpt template tags, although I didn't get around to fixing it:

http://groups.google.com/group/hyde-dev/browse_thread/thread/2dfecfe3fab29896

@navilan
Copy link
Member

navilan commented Feb 5, 2010

Custom markers for excerpt and article should fix this. Will add support for it.

@solsticedhiver
Copy link
Author

i have noted too, that hyde eats my title at the beginning of resctructuredtext section
for example

----
Test
----
Another title
=============
This is a test

is rendered as

This is a test

By looking at the code, i found that, may be, using html_body instead of fragment in line 87 of ./hydeengine/templatetags/aym.py would be better.
it allows to have the full html from the rest snippet.

another issue i have is that any snippet like above gives me h1 header. and i can't get h2 header only without having h1 header. that's a problem with rest and not hyde of course.

@solsticedhiver
Copy link
Author

a (hackish ? ) solution to the problem of excerpt hyde tag is to use restructured text comment in your rst text.
This is my fisrt post

.. Hyde::Excerpt::Begin

This will be the excerpt of the article

.. Hyde::Excerpt::End

Here is the rest of the post

there will be transformed into html comment that hyde will find as if they were transfromed from django tag.

for article you can do the same but {%article %} {% endarticle %} are better placed at the outside of the article ?

@pascalw
Copy link

pascalw commented Oct 26, 2010

Unfortunately I'm still experiencing this issue in version 0.4, with textile in my case. Any way to decently solve this? Placing the textile tags inside every posting works, but is terribly hackish.

@navilan
Copy link
Member

navilan commented Nov 12, 2010

I have responded to a similar issue - but idea is to move away from markers and use context. In most cases the new reference tag should be very useful.

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

No branches or pull requests

4 participants