Issue 65 in nhaml: Possibility to add custom markuprules?

2 views
Skip to first unread message

codesite...@google.com

unread,
Nov 9, 2009, 4:03:07 AM11/9/09
to nhaml...@googlegroups.com
Status: New
Owner: ----

New issue 65 by Boris.Callens: Possibility to add custom markuprules?
http://code.google.com/p/nhaml/issues/detail?id=65

In order to register custom markup rules it would suffice to create a
class that inherits from MarkupRule and then register it by adding by
running AddRule on NHamlMvcViewEngine.TemplateEngine.Options.

If I'm not mistaking currently this is impossible from outside the
NHamlMvcViewEngine because Template engine is protected.

By simply either making the TemplateEngine property public (get only) or
by propagating the AddRule method somewhere we could enable run-time
adding of custom rules.

This allows me to do

var nHamlMvcViewEngine = new NHamlMvcViewEngine();
nHamlMvcViewEngine.TemplateEngine.Options.AddRule(
new Boris.NHaml.Rules.MyCustomMarkupRule());
ViewEngines.Engines.Add(nHamlMvcViewEngine);

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Nov 10, 2009, 1:23:20 AM11/10/09
to nhaml...@googlegroups.com
Updates:
Status: Fixed

Comment #1 on issue 65 by simon.cropp: Possibility to add custom
markuprules?
http://code.google.com/p/nhaml/issues/detail?id=65

done
go here for latest build
http://teamcity.codebetter.com/viewLog.html?buildId=lastSuccessful&buildTypeId=bt43&tab=artifacts

codesite...@google.com

unread,
Nov 10, 2009, 3:31:25 AM11/10/09
to nhaml...@googlegroups.com

Comment #2 on issue 65 by Boris.Callens: Possibility to add custom
markuprules?
http://code.google.com/p/nhaml/issues/detail?id=65

Nice :)

codesite...@google.com

unread,
Nov 10, 2009, 3:35:26 AM11/10/09
to nhaml...@googlegroups.com

Comment #3 on issue 65 by Boris.Callens: Possibility to add custom
Reply all
Reply to author
Forward
0 new messages