Skip to content

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

Description

@solsticedhiver

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.

Activity

  1. JoshRosen commented on Feb 5, 2010

    @JoshRosen

    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

  2. navilan commented on Feb 5, 2010

    @navilan
    Member

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

  3. solsticedhiver commented on Feb 6, 2010

    @solsticedhiver
    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.

  4. solsticedhiver commented on Feb 7, 2010

    @solsticedhiver
    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 ?

  5. pascalw commented on Oct 26, 2010

    @pascalw

    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.

  6. navilan commented on Nov 12, 2010

    @navilan
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions