Difference between revisions of "User:Benmachine/hasktag bug"

From HaskellWiki
Jump to navigation Jump to search
(New page: When you open a comment inside <hask> tags without closing it, the parser breaks. Observe: Oh no: <hask>{-</hask> I broke it! Here's some nicely-formatted code: <haskell> id :: a ...)
 
(deleting exposition of now-fixed bug)
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
One of these was fixed, but this one still remains:
When you open a comment inside &lt;hask&gt; tags without closing it, the parser breaks. Observe:
 
   
  +
=== Paragraphs ===
Oh no: <hask>{-</hask> I broke it!
 
   
  +
Use of the tag seems to merge consecutive paragraphs:
Here's some nicely-formatted code:
 
   
  +
Here is a paragraph with <hask>code</hask> in it.
<haskell>
 
id :: a -> a
 
id x = const x x
 
   
  +
Here is another, distinct paragraph, with more <hask>code</hask> in it.
const :: a -> b -> a
 
const x _ = id x
 
</haskell>
 
   
  +
Here is a paragraph with no code.
which is now ruined. Interestingly this text is fine.
 
 
Perhaps it's only paragraphs with <hask>any</hask> code that are broken.
 
 
Closing comments on their own inside comments seem to have no effect: <hask>-}</hask> this is not fixed
 
 
== The problem ==
 
 
doesn't even stop at section boundaries:
 
<haskell>
 
error :: String -> a
 
error str = error (error str)
 
</haskell>
 

Revision as of 12:45, 1 November 2015

One of these was fixed, but this one still remains:

Paragraphs

Use of the tag seems to merge consecutive paragraphs:

Here is a paragraph with code in it.

Here is another, distinct paragraph, with more code in it.

Here is a paragraph with no code.