-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to prevent generating closing tag? #16
Comments
Ok, now I tried to pass the <> brackets via function into the template. But that still gives me the closing tag at the end of the resulting string...
results in
|
Hi, I suspect |
Hi, thank's for your reply. I am replacing the wrongly generated end tag with empty space after parsing the template. a bit of a hack, but does the job. in the end it is still an html parser. |
Hi, thanks for the info! I think whole this library is "bit of a hack, but does the job" 😄 |
BTW, everything you put after < will get parsed as a string, even if you use the {{{ ... }}} brackets. so """some text <{{{ with |> dosomething }}}>""" ends in some text<{{{{ with |> dosomething }}}></{{{ with |> dosomething }}}> to prevent this, I had to pull a function in, which generates the opening angel bracket < - then I just have to get rid of the closing tag. |
Hmmm... 🤔 If you would be able to produce a test (with PR to fix) that would be a big help! 🙏 |
Hm, I can try. I don't know if I have enough knowledge of F# and I am sure I don't know how to proceed. Quite new to Git/Github. Maybe you can explain what you want from me, or give me a hint where I can read some procedures for Test and PR. |
No problem. Here is the path I would go through:
|
Challenge accepted 🙏 |
I've also run into this problem (I wanted to create an rss-feed). The core issue is the usage of HtmlAgilityPack. The question to me is, do you see this library as a html-only library or a general purpose templating library. Because if it's the latter, we might want to discuss an alternative syntax for conditionals/loops. |
Hello!
I am using this library just a few days and really like it. I am using it for writting markdown and java code. Problem is, when having a Java code template, which uses these brackets <> for writing generics, then I automatically get an closing tag of said generic.
i.e.
public class Foo { ... }
turns into
public class Foo { ... }
How can I prevent this behaviour?
Greetings
Thomas
The text was updated successfully, but these errors were encountered: