some cleanup
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
COMPONENT(Request& context)
|
||||
{
|
||||
String lang = first(context.call["lang"].to_string(), "plain");
|
||||
String lang = first(context.props["lang"].to_string(), "plain");
|
||||
<>
|
||||
<section>
|
||||
<p><strong>Code block:</strong> <?= lang ?></p>
|
||||
<div><?: context.call["default_html"].to_string() ?></div>
|
||||
<div><?: context.props["default_html"].to_string() ?></div>
|
||||
</section>
|
||||
</>
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
COMPONENT(Request& context)
|
||||
{
|
||||
String title = first(
|
||||
context.call["node"]["attrs"]["title"].to_string(),
|
||||
context.call["argument"].to_string(),
|
||||
context.props["node"]["attrs"]["title"].to_string(),
|
||||
context.props["argument"].to_string(),
|
||||
"Notice"
|
||||
);
|
||||
|
||||
<>
|
||||
<aside>
|
||||
<p><strong><?= title ?></strong></p>
|
||||
<div><?: context.call["children_html"].to_string() ?></div>
|
||||
<div><?: context.props["children_html"].to_string() ?></div>
|
||||
</aside>
|
||||
</>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user