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

template variable doesn't work with whitespace #86

Open
ZPVIP opened this issue Nov 30, 2015 · 0 comments
Open

template variable doesn't work with whitespace #86

ZPVIP opened this issue Nov 30, 2015 · 0 comments

Comments

@ZPVIP
Copy link
Contributor

ZPVIP commented Nov 30, 2015

https://github.com/nricciar/wikicloth/blob/master/test/wiki_cloth_test.rb

I added {{{test one}}} {{{one}}} :

template do |template|
...
when "testparams"
      "{{{def|hello world}}} {{{1}}} {{{test}}} {{{test one}}} {{{one}}} {{{nested|{{{2}}}}}}"
...
test "template params" do
    wiki = WikiParser.new(:data => "{{testparams|test|test=bla|test one=foo|it worked|bla=whoo}}\n")
    data = wiki.to_html
end

it works with {{{test}}}, so we can get bla, but not with {{{test one}}}, for there is a whitespace in variable,

if we define {{{one}}} in Template, we can get foo, but the right variable should be {{{test one}}}

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

No branches or pull requests

1 participant