Skip to content

Commit

Permalink
Title from src and media provider sanity!
Browse files Browse the repository at this point in the history
Fix: #65

Fix: #62

Fix: #60

Fix: #40 Split more specific
aspects to other tickets.
  • Loading branch information
cirosantilli committed May 26, 2020
1 parent eab13dc commit 2c010d8
Show file tree
Hide file tree
Showing 9 changed files with 430 additions and 271 deletions.
162 changes: 108 additions & 54 deletions README.ciro

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes
7 changes: 4 additions & 3 deletions cirodown
Expand Up @@ -62,23 +62,24 @@ class SqliteIdProvider extends cirodown.IdProvider {
this.delete_includes_stmt.run(input_path_noext_renamed);
}

get(id) {
get(id, context) {
let get_ret = this.get_id_stmt.get(id);
if (get_ret === undefined) {
return undefined;
} else {
const ast = cirodown.AstNode.fromJSON(get_ret.ast_json);
ast.input_path = get_ret.path;
ast.id = id;
cirodown.validate_ast(ast, context);
return ast;
}
}

get_includes(to_id) {
get_includes(to_id, context) {
let all_rets = this.get_includes_stmt.all(to_id);
let ret = [];
for (const all_ret of all_rets) {
const from_ast = this.get(all_ret.from_id);
const from_ast = this.get(all_ret.from_id, context);
if (from_ast === undefined) {
throw 'parent ID of include not in database, not sure how this can happen so throwing';
} else {
Expand Down
2 changes: 1 addition & 1 deletion cirodown.scss
Expand Up @@ -96,7 +96,7 @@ div.p {

// Figures.
figure {
margin: 0 0 $p-margin-vert 0;
margin: $p-margin-vert 0;
figcaption {
margin-top: 5px;
}
Expand Down
4 changes: 2 additions & 2 deletions editor.html
Expand Up @@ -118,11 +118,11 @@

Reference to a header: \x[paragraphs-and-stuff]. Or if you want to show the section id: \x[paragraphs-and-stuff]{style=full}.

Reference to the following image: \x[fig-my-xi-chrysanthemum].
Reference to the following image: \x[image-my-xi-chrysanthemum].

\Image[https://raw.githubusercontent.com/cirosantilli/media/master/Chrysanthemum_Xi_Jinping_with_black_red_liusi_added_by_Ciro_Santilli.jpg]
{title=Xi Chrysanthemum is a very nice image}
{id=fig-my-xi-chrysanthemum}
{id=image-my-xi-chrysanthemum}
{source=https://commons.wikimedia.org/wiki/File:Lotus_flower_(978659).jpg}

=== Unlimited header levels?!
Expand Down

0 comments on commit 2c010d8

Please sign in to comment.