-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from brack-lang/fix/unify_metadata_to_get_metadata
Fix/unify metadata to get metadata
- Loading branch information
Showing
16 changed files
with
96 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,20 @@ The standard library of the brack-language for targeting to naive HTML. | |
|
||
## Installation | ||
```sh | ||
$ brack add github:brack-lang/std.html | ||
brack add github:brack-lang/[email protected] # develop | ||
brack add github:brack-lang/[email protected] # main (under construction) | ||
``` | ||
|
||
## Syntax | ||
### Heading | ||
```brack | ||
{std.* Hello!} | ||
{std.** } | ||
{std.** Hello\, World!} | ||
``` | ||
|
||
```html | ||
<h1>Hello!</h1> | ||
<h2>Hello, World!</h2> | ||
``` | ||
|
||
### Bold | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use brack_sdk_rs::MetaData; | ||
use extism_pdk::{FnResult, Json, plugin_fn}; | ||
|
||
use crate::{ | ||
anchor::metadata_anchor, | ||
bold::metadata_bold, | ||
code::{metadata_block_code, metadata_inline_code}, | ||
footnote::metadata_footnote, | ||
headings::metadata_headings, | ||
image::metadata_image, | ||
italic::metadata_italic, | ||
list::{metadata_ordered_list, metadata_unordered_list}, | ||
quote::{metadata_block_quote, metadata_inline_quote}, | ||
rules::metadata_rules, | ||
strike::metadata_strike, table::metadata_table, | ||
}; | ||
|
||
#[plugin_fn] | ||
pub fn get_metadata() -> FnResult<Json<Vec<MetaData>>> { | ||
let mut metadata = Vec::new(); | ||
metadata.push(metadata_anchor()); | ||
metadata.push(metadata_bold()); | ||
metadata.push(metadata_inline_code()); | ||
metadata.push(metadata_block_code()); | ||
metadata.push(metadata_footnote()); | ||
metadata.append(&mut metadata_headings()); | ||
metadata.push(metadata_image()); | ||
metadata.push(metadata_italic()); | ||
metadata.push(metadata_unordered_list()); | ||
metadata.push(metadata_ordered_list()); | ||
metadata.push(metadata_inline_quote()); | ||
metadata.push(metadata_block_quote()); | ||
metadata.push(metadata_rules()); | ||
metadata.push(metadata_strike()); | ||
metadata.push(metadata_table()); | ||
Ok(Json(metadata)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.