-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Question] Please bump docs.rs version to 0.3.2 #9
Comments
Can you give me example code where I can recreate the issue? The tests are passing so while there could be a bug, it should be pretty solid so something as basic as dot notation not working makes me feel like it could be an issue with the data you're providing or the mustache template you're using. |
This works in 0.2.1, but not in 3.1. So I am sure something has changed
outside of my code.
the json is :
{"users":[{"a":"абетка","b":"alphabet","id":1,"lesson":"0"},{"a":"Австралія","b":"Australia","id":2,"lesson":"0"},{"a":"адреса","b":"address","id":3,"lesson":"0"},{"a":"актор","b":"actor","id":4,","b":"actor","id":4,"lesson":"0"},{"a":"алфавіт","b":"alphabet","id":5,"lesson":"0"},{"a":"Америка","b":"America","id":6,"lesson":"0"},{"a":"англійська","b":"English","id":7,"lesson":"0"},{"a":"анкета","b":"questionnaire","id":8,"lesson":"0"},{"a":"балет","b":"ballet","id":9,"lesson":"0"},{"a":"бізнесмен","b":"businessman","id":10,"lesson":"0"},{"a":"Бразилія","b":"Brazil","id":11,"lesson":"0"},{"a":"бразильська","b":"Brazilian","id":12,"lesson":"0"},{"a":"будинок","b":"house","id":13,"lesson":"0"},{"a":"буква","b":"letter","id":14,"lesson":"0"},{"a":"Великобританія","b":"United
Kingdom","id":15,"lesson":"0"}]}
<div class="rounded-xl border bg-gray-900">
<table class="w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col" class="p-3">Id</th>
<th scope="col" class="p-3">Lesson</th>
<th scope="col" class="p-3">Word</th>
<th scope="col" class="p-3">Description</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-300">
{{#users}}
<tr>
<td class="p-3">{{.id}}</td>
<td class="p-3">{{.lesson}}</td>
<td class="p-3">{{.a}}</td>
<td class="p-3">{{.b}}</td>
</tr>
{{/users}}
</tbody>
</table>
</div>
let result = parse_template(String::from("vocabulary.html"), args);
pub fn parse_template(text: String, args: String) -> String {
let path: std::path::PathBuf = ["templates", text.as_str()].iter().
collect();
let name = String::from(path.to_str().unwrap());
// load from file into string
let file_contents = fs::read_to_string(name).unwrap();
let partials = parse_partials();
let result =
ribboncurls::render(&file_contents, args.as_str(), Some(partials.
as_str())).unwrap();
result
}
…On Mon, Sep 2, 2024 at 12:40 AM Jamy ***@***.***> wrote:
Can you give me example code where I can recreate the issue?
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABILOZ7FQBXGMGWQKLLFZSDZUOJXJAVCNFSM6AAAAABNDK3MUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGUZDGMJYHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I can't get your example to work with ribboncurls |
Solved. That was the issue. |
Great! I’ll look at adding support for linting or debugging to make this issue more easily visible. |
What version of
ribboncurls
are you using?0.3.1 and . notation does not work
The text was updated successfully, but these errors were encountered: