Merge branch 'element_template'
This commit is contained in:
		
						commit
						0e9d74b2c8
					
				
							
								
								
									
										111
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										111
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @ -71,6 +71,12 @@ version = "0.5.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "autocfg" | ||||
| version = "1.1.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "backtrace" | ||||
| version = "0.3.69" | ||||
| @ -192,6 +198,95 @@ version = "1.1.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "futures" | ||||
| version = "0.3.29" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" | ||||
| dependencies = [ | ||||
|  "futures-channel", | ||||
|  "futures-core", | ||||
|  "futures-executor", | ||||
|  "futures-io", | ||||
|  "futures-sink", | ||||
|  "futures-task", | ||||
|  "futures-util", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "futures-channel" | ||||
| version = "0.3.29" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" | ||||
| dependencies = [ | ||||
|  "futures-core", | ||||
|  "futures-sink", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "futures-core" | ||||
| version = "0.3.29" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "futures-executor" | ||||
| version = "0.3.29" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" | ||||
| dependencies = [ | ||||
|  "futures-core", | ||||
|  "futures-task", | ||||
|  "futures-util", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "futures-io" | ||||
| version = "0.3.29" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "futures-macro" | ||||
| version = "0.3.29" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
|  "syn", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "futures-sink" | ||||
| version = "0.3.29" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "futures-task" | ||||
| version = "0.3.29" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "futures-util" | ||||
| version = "0.3.29" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" | ||||
| dependencies = [ | ||||
|  "futures-channel", | ||||
|  "futures-core", | ||||
|  "futures-io", | ||||
|  "futures-macro", | ||||
|  "futures-sink", | ||||
|  "futures-task", | ||||
|  "memchr", | ||||
|  "pin-project-lite", | ||||
|  "pin-utils", | ||||
|  "slab", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "gimli" | ||||
| version = "0.28.0" | ||||
| @ -347,6 +442,12 @@ version = "0.2.13" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "pin-utils" | ||||
| version = "0.1.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "proc-macro2" | ||||
| version = "1.0.69" | ||||
| @ -432,6 +533,15 @@ dependencies = [ | ||||
|  "serde", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "slab" | ||||
| version = "0.4.9" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" | ||||
| dependencies = [ | ||||
|  "autocfg", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "static_assertions" | ||||
| version = "1.1.0" | ||||
| @ -641,6 +751,7 @@ version = "0.0.1" | ||||
| dependencies = [ | ||||
|  "clap", | ||||
|  "duster", | ||||
|  "futures", | ||||
|  "include_dir", | ||||
|  "organic", | ||||
|  "serde", | ||||
|  | ||||
| @ -8,6 +8,7 @@ edition = "2021" | ||||
| [dependencies] | ||||
| clap = { version = "4.4.6", default-features = false, features = ["std", "color", "help", "derive"] } | ||||
| duster = { git = "https://code.fizz.buzz/talexander/duster.git", branch = "master" } | ||||
| futures = "0.3.29" | ||||
| include_dir = "0.7.3" | ||||
| # TODO: This is temporary to work on the latest organic code. Eventually switch back to using the published crate. | ||||
| organic = { path = "../organic" } | ||||
|  | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/angle_link.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/angle_link.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| angle_link | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/babel_call.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/babel_call.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| babel_call | ||||
| @ -7,5 +7,8 @@ | ||||
|   {! TODO: Table of contents? !} | ||||
| 
 | ||||
|   <div class="blog_post_body"> | ||||
|     {#.children} | ||||
|       {>document_element/} | ||||
|     {/.children} | ||||
|   </div> | ||||
| </div> | ||||
|  | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/bold.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/bold.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| bold | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/center_block.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/center_block.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| center_block | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/citation.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/citation.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| citation | ||||
| @ -0,0 +1 @@ | ||||
| citation_reference | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/clock.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/clock.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| clock | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/code.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/code.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| code | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/comment.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/comment.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| comment | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/comment_block.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/comment_block.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| comment_block | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/diary_sexp.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/diary_sexp.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| diary_sexp | ||||
							
								
								
									
										5
									
								
								default_environment/templates/html/document_element.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								default_environment/templates/html/document_element.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
| {@select key=.type} | ||||
|   {@eq value="heading"}{>heading/}{/eq} | ||||
|   {@eq value="section"}{>section/}{/eq} | ||||
|   {@none}{!TODO: make this panic!}ERROR: Unrecognized type {.type}.{/none} | ||||
| {/select} | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/drawer.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/drawer.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| drawer | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/dynamic_block.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/dynamic_block.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| dynamic_block | ||||
							
								
								
									
										27
									
								
								default_environment/templates/html/element.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								default_environment/templates/html/element.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | ||||
| {@select key=.type} | ||||
|   {@eq value="paragraph"}{>paragraph/}{/eq} | ||||
|   {@eq value="plain_list"}{>plain_list/}{/eq} | ||||
|   {@eq value="center_block"}{>center_block/}{/eq} | ||||
|   {@eq value="quote_block"}{>quote_block/}{/eq} | ||||
|   {@eq value="special_block"}{>special_block/}{/eq} | ||||
|   {@eq value="dynamic_block"}{>dynamic_block/}{/eq} | ||||
|   {@eq value="footnote_definition"}{>footnote_definition/}{/eq} | ||||
|   {@eq value="comment"}{>comment/}{/eq} | ||||
|   {@eq value="drawer"}{>drawer/}{/eq} | ||||
|   {@eq value="property_drawer"}{>property_drawer/}{/eq} | ||||
|   {@eq value="table"}{>table/}{/eq} | ||||
|   {@eq value="verse_block"}{>verse_block/}{/eq} | ||||
|   {@eq value="comment_block"}{>comment_block/}{/eq} | ||||
|   {@eq value="example_block"}{>example_block/}{/eq} | ||||
|   {@eq value="export_block"}{>export_block/}{/eq} | ||||
|   {@eq value="src_block"}{>src_block/}{/eq} | ||||
|   {@eq value="clock"}{>clock/}{/eq} | ||||
|   {@eq value="diary_sexp"}{>diary_sexp/}{/eq} | ||||
|   {@eq value="planning"}{>planning/}{/eq} | ||||
|   {@eq value="fixed_width_area"}{>fixed_width_area/}{/eq} | ||||
|   {@eq value="horizontal_rule"}{>horizontal_rule/}{/eq} | ||||
|   {@eq value="keyword"}{>keyword/}{/eq} | ||||
|   {@eq value="babel_call"}{>babel_call/}{/eq} | ||||
|   {@eq value="latex_environment"}{>latex_environment/}{/eq} | ||||
|   {@none}{!TODO: make this panic!}ERROR: Unrecognized type {.type}.{/none} | ||||
| {/select} | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/entity.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/entity.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| entity | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/example_block.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/example_block.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| example_block | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/export_block.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/export_block.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| export_block | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/export_snippet.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/export_snippet.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| export_snippet | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/fixed_width_area.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/fixed_width_area.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| fixed_width_area | ||||
| @ -0,0 +1 @@ | ||||
| footnote_definition | ||||
| @ -0,0 +1 @@ | ||||
| footnote_reference | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/global_settings.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/global_settings.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| global_settings | ||||
							
								
								
									
										11
									
								
								default_environment/templates/html/heading.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								default_environment/templates/html/heading.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| {@lte key=.level value=4} | ||||
|   <h{.level}>{#.title}{>object/}{/.title}</h{.level}> | ||||
| {:else} | ||||
|   <ol> | ||||
|     <li>{#.title}{>object/}{/.title}</li> | ||||
|   </ol> | ||||
| {/lte} | ||||
| 
 | ||||
| {#.children} | ||||
|   {>document_element/} | ||||
| {/.children} | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/horizontal_rule.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/horizontal_rule.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| horizontal_rule | ||||
| @ -0,0 +1 @@ | ||||
| inline_babel_call | ||||
| @ -0,0 +1 @@ | ||||
| inline_source_block | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/italic.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/italic.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| italic | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/keyword.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/keyword.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| keyword | ||||
| @ -0,0 +1 @@ | ||||
| latex_environment | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/latex_fragment.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/latex_fragment.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| latex_fragment | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/line_break.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/line_break.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| line_break | ||||
							
								
								
									
										30
									
								
								default_environment/templates/html/object.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								default_environment/templates/html/object.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,30 @@ | ||||
| {@select key=.type} | ||||
|   {@eq value="bold"}{>bold/}{/eq} | ||||
|   {@eq value="italic"}{>italic/}{/eq} | ||||
|   {@eq value="underline"}{>underline/}{/eq} | ||||
|   {@eq value="strike_through"}{>strike_through/}{/eq} | ||||
|   {@eq value="code"}{>code/}{/eq} | ||||
|   {@eq value="verbatim"}{>verbatim/}{/eq} | ||||
|   {@eq value="plain_text"}{>plain_text/}{/eq} | ||||
|   {@eq value="regular_link"}{>regular_link/}{/eq} | ||||
|   {@eq value="radio_link"}{>radio_link/}{/eq} | ||||
|   {@eq value="radio_target"}{>radio_target/}{/eq} | ||||
|   {@eq value="plain_link"}{>plain_link/}{/eq} | ||||
|   {@eq value="angle_link"}{>angle_link/}{/eq} | ||||
|   {@eq value="org_macro"}{>org_macro/}{/eq} | ||||
|   {@eq value="entity"}{>entity/}{/eq} | ||||
|   {@eq value="latex_fragment"}{>latex_fragment/}{/eq} | ||||
|   {@eq value="export_snippet"}{>export_snippet/}{/eq} | ||||
|   {@eq value="footnote_reference"}{>footnote_reference/}{/eq} | ||||
|   {@eq value="citation"}{>citation/}{/eq} | ||||
|   {@eq value="citation_reference"}{>citation_reference/}{/eq} | ||||
|   {@eq value="inline_babel_call"}{>inline_babel_call/}{/eq} | ||||
|   {@eq value="inline_source_block"}{>inline_source_block/}{/eq} | ||||
|   {@eq value="line_break"}{>line_break/}{/eq} | ||||
|   {@eq value="target"}{>target/}{/eq} | ||||
|   {@eq value="statistics_cookie"}{>statistics_cookie/}{/eq} | ||||
|   {@eq value="subscript"}{>subscript/}{/eq} | ||||
|   {@eq value="superscript"}{>superscript/}{/eq} | ||||
|   {@eq value="timestamp"}{>timestamp/}{/eq} | ||||
|   {@none}{!TODO: make this panic!}ERROR: Unrecognized type {.type}.{/none} | ||||
| {/select} | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/org_macro.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/org_macro.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| org_macro | ||||
							
								
								
									
										3
									
								
								default_environment/templates/html/paragraph.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								default_environment/templates/html/paragraph.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| <p>{#.children} | ||||
|   {>object/} | ||||
| {/.children}</p> | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/plain_link.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/plain_link.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| plain_link | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/plain_list.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/plain_list.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| plain_list | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/plain_text.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/plain_text.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| plain_text | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/planning.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/planning.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| planning | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/property_drawer.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/property_drawer.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| property_drawer | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/quote_block.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/quote_block.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| quote_block | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/radio_link.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/radio_link.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| radio_link | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/radio_target.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/radio_target.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| radio_target | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/regular_link.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/regular_link.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| regular_link | ||||
							
								
								
									
										3
									
								
								default_environment/templates/html/section.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								default_environment/templates/html/section.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| {#.children} | ||||
|   {>element/} | ||||
| {/.children} | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/special_block.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/special_block.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| special_block | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/src_block.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/src_block.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| src_block | ||||
| @ -0,0 +1 @@ | ||||
| statistics_cookie | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/strike_through.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/strike_through.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| strike_through | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/subscript.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/subscript.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| subscript | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/superscript.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/superscript.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| superscript | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/table.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/table.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| table | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/target.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/target.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| target | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/timestamp.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/timestamp.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| timestamp | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/underline.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/underline.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| underline | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/verbatim.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/verbatim.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| verbatim | ||||
							
								
								
									
										1
									
								
								default_environment/templates/html/verse_block.dust
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								default_environment/templates/html/verse_block.dust
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| verse_block | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IAngleLink; | ||||
| pub(crate) struct RenderAngleLink {} | ||||
| 
 | ||||
| impl RenderAngleLink { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IAngleLink, | ||||
|     ) -> Result<RenderAngleLink, CustomError> { | ||||
|         Ok(RenderAngleLink {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IBabelCall; | ||||
| pub(crate) struct RenderBabelCall {} | ||||
| 
 | ||||
| impl RenderBabelCall { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IBabelCall, | ||||
|     ) -> Result<RenderBabelCall, CustomError> { | ||||
|         Ok(RenderBabelCall {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IBold; | ||||
| pub(crate) struct RenderBold {} | ||||
| 
 | ||||
| impl RenderBold { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IBold, | ||||
|     ) -> Result<RenderBold, CustomError> { | ||||
|         Ok(RenderBold {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::ICenterBlock; | ||||
| pub(crate) struct RenderCenterBlock {} | ||||
| 
 | ||||
| impl RenderCenterBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &ICenterBlock, | ||||
|     ) -> Result<RenderCenterBlock, CustomError> { | ||||
|         Ok(RenderCenterBlock {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::ICitation; | ||||
| pub(crate) struct RenderCitation {} | ||||
| 
 | ||||
| impl RenderCitation { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &ICitation, | ||||
|     ) -> Result<RenderCitation, CustomError> { | ||||
|         Ok(RenderCitation {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::ICitationReference; | ||||
| pub(crate) struct RenderCitationReference {} | ||||
| 
 | ||||
| impl RenderCitationReference { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &ICitationReference, | ||||
|     ) -> Result<RenderCitationReference, CustomError> { | ||||
|         Ok(RenderCitationReference {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IClock; | ||||
| pub(crate) struct RenderClock {} | ||||
| 
 | ||||
| impl RenderClock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IClock, | ||||
|     ) -> Result<RenderClock, CustomError> { | ||||
|         Ok(RenderClock {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::ICode; | ||||
| pub(crate) struct RenderCode {} | ||||
| 
 | ||||
| impl RenderCode { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &ICode, | ||||
|     ) -> Result<RenderCode, CustomError> { | ||||
|         Ok(RenderCode {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IComment; | ||||
| pub(crate) struct RenderComment {} | ||||
| 
 | ||||
| impl RenderComment { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IComment, | ||||
|     ) -> Result<RenderComment, CustomError> { | ||||
|         Ok(RenderComment {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::ICommentBlock; | ||||
| pub(crate) struct RenderCommentBlock {} | ||||
| 
 | ||||
| impl RenderCommentBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &ICommentBlock, | ||||
|     ) -> Result<RenderCommentBlock, CustomError> { | ||||
|         Ok(RenderCommentBlock {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IDiarySexp; | ||||
| pub(crate) struct RenderDiarySexp {} | ||||
| 
 | ||||
| impl RenderDiarySexp { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IDiarySexp, | ||||
|     ) -> Result<RenderDiarySexp, CustomError> { | ||||
|         Ok(RenderDiarySexp {}) | ||||
|  | ||||
| @ -1,5 +1,11 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IDocumentElement; | ||||
| 
 | ||||
| use super::RenderHeading; | ||||
| use super::RenderSection; | ||||
| 
 | ||||
| @ -9,3 +15,21 @@ pub(crate) enum RenderDocumentElement { | ||||
|     Heading(RenderHeading), | ||||
|     Section(RenderSection), | ||||
| } | ||||
| 
 | ||||
| impl RenderDocumentElement { | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IDocumentElement, | ||||
|     ) -> Result<RenderDocumentElement, CustomError> { | ||||
|         match original { | ||||
|             IDocumentElement::Heading(inner) => Ok(RenderDocumentElement::Heading( | ||||
|                 RenderHeading::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|             IDocumentElement::Section(inner) => Ok(RenderDocumentElement::Section( | ||||
|                 RenderSection::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IDrawer; | ||||
| pub(crate) struct RenderDrawer {} | ||||
| 
 | ||||
| impl RenderDrawer { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IDrawer, | ||||
|     ) -> Result<RenderDrawer, CustomError> { | ||||
|         Ok(RenderDrawer {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IDynamicBlock; | ||||
| pub(crate) struct RenderDynamicBlock {} | ||||
| 
 | ||||
| impl RenderDynamicBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IDynamicBlock, | ||||
|     ) -> Result<RenderDynamicBlock, CustomError> { | ||||
|         Ok(RenderDynamicBlock {}) | ||||
|  | ||||
| @ -61,10 +61,10 @@ pub(crate) enum RenderElement { | ||||
| } | ||||
| 
 | ||||
| impl RenderElement { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         element: &IElement, | ||||
|     ) -> Result<RenderElement, CustomError> { | ||||
|         match element { | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IEntity; | ||||
| pub(crate) struct RenderEntity {} | ||||
| 
 | ||||
| impl RenderEntity { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IEntity, | ||||
|     ) -> Result<RenderEntity, CustomError> { | ||||
|         Ok(RenderEntity {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IExampleBlock; | ||||
| pub(crate) struct RenderExampleBlock {} | ||||
| 
 | ||||
| impl RenderExampleBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IExampleBlock, | ||||
|     ) -> Result<RenderExampleBlock, CustomError> { | ||||
|         Ok(RenderExampleBlock {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IExportBlock; | ||||
| pub(crate) struct RenderExportBlock {} | ||||
| 
 | ||||
| impl RenderExportBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IExportBlock, | ||||
|     ) -> Result<RenderExportBlock, CustomError> { | ||||
|         Ok(RenderExportBlock {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IExportSnippet; | ||||
| pub(crate) struct RenderExportSnippet {} | ||||
| 
 | ||||
| impl RenderExportSnippet { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IExportSnippet, | ||||
|     ) -> Result<RenderExportSnippet, CustomError> { | ||||
|         Ok(RenderExportSnippet {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IFixedWidthArea; | ||||
| pub(crate) struct RenderFixedWidthArea {} | ||||
| 
 | ||||
| impl RenderFixedWidthArea { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IFixedWidthArea, | ||||
|     ) -> Result<RenderFixedWidthArea, CustomError> { | ||||
|         Ok(RenderFixedWidthArea {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IFootnoteDefinition; | ||||
| pub(crate) struct RenderFootnoteDefinition {} | ||||
| 
 | ||||
| impl RenderFootnoteDefinition { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IFootnoteDefinition, | ||||
|     ) -> Result<RenderFootnoteDefinition, CustomError> { | ||||
|         Ok(RenderFootnoteDefinition {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IFootnoteReference; | ||||
| pub(crate) struct RenderFootnoteReference {} | ||||
| 
 | ||||
| impl RenderFootnoteReference { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IFootnoteReference, | ||||
|     ) -> Result<RenderFootnoteReference, CustomError> { | ||||
|         Ok(RenderFootnoteReference {}) | ||||
|  | ||||
| @ -6,6 +6,7 @@ use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IHeading; | ||||
| 
 | ||||
| use super::RenderDocumentElement; | ||||
| use super::RenderObject; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| @ -14,23 +15,46 @@ use super::RenderObject; | ||||
| pub(crate) struct RenderHeading { | ||||
|     level: organic::types::HeadlineLevel, | ||||
|     title: Vec<RenderObject>, | ||||
|     children: Vec<RenderDocumentElement>, | ||||
| } | ||||
| 
 | ||||
| impl RenderHeading { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         heading: &IHeading, | ||||
|     ) -> Result<RenderHeading, CustomError> { | ||||
|         let title = heading | ||||
|             .title | ||||
|             .iter() | ||||
|             .map(|obj| RenderObject::new(config, &output_directory, &output_file, obj)) | ||||
|             .collect::<Result<Vec<_>, _>>()?; | ||||
|         let title = { | ||||
|             let mut ret = Vec::new(); | ||||
|             for obj in heading.title.iter() { | ||||
|                 ret.push(RenderObject::new( | ||||
|                     config, | ||||
|                     &output_directory, | ||||
|                     &output_file, | ||||
|                     obj, | ||||
|                 )?); | ||||
|             } | ||||
|             ret | ||||
|         }; | ||||
| 
 | ||||
|         let children = { | ||||
|             let mut ret = Vec::new(); | ||||
|             for obj in heading.children.iter() { | ||||
|                 ret.push(RenderDocumentElement::new( | ||||
|                     config, | ||||
|                     &output_directory, | ||||
|                     &output_file, | ||||
|                     obj, | ||||
|                 )?); | ||||
|             } | ||||
|             ret | ||||
|         }; | ||||
| 
 | ||||
|         Ok(RenderHeading { | ||||
|             level: heading.level, | ||||
|             level: heading.level + 1, // Adding 1 because the page title is going to be h1.
 | ||||
|             title, | ||||
|             children, | ||||
|         }) | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IHorizontalRule; | ||||
| pub(crate) struct RenderHorizontalRule {} | ||||
| 
 | ||||
| impl RenderHorizontalRule { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IHorizontalRule, | ||||
|     ) -> Result<RenderHorizontalRule, CustomError> { | ||||
|         Ok(RenderHorizontalRule {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IInlineBabelCall; | ||||
| pub(crate) struct RenderInlineBabelCall {} | ||||
| 
 | ||||
| impl RenderInlineBabelCall { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IInlineBabelCall, | ||||
|     ) -> Result<RenderInlineBabelCall, CustomError> { | ||||
|         Ok(RenderInlineBabelCall {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IInlineSourceBlock; | ||||
| pub(crate) struct RenderInlineSourceBlock {} | ||||
| 
 | ||||
| impl RenderInlineSourceBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IInlineSourceBlock, | ||||
|     ) -> Result<RenderInlineSourceBlock, CustomError> { | ||||
|         Ok(RenderInlineSourceBlock {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IItalic; | ||||
| pub(crate) struct RenderItalic {} | ||||
| 
 | ||||
| impl RenderItalic { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IItalic, | ||||
|     ) -> Result<RenderItalic, CustomError> { | ||||
|         Ok(RenderItalic {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IKeyword; | ||||
| pub(crate) struct RenderKeyword {} | ||||
| 
 | ||||
| impl RenderKeyword { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         keyword: &IKeyword, | ||||
|     ) -> Result<RenderKeyword, CustomError> { | ||||
|         Ok(RenderKeyword {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::ILatexEnvironment; | ||||
| pub(crate) struct RenderLatexEnvironment {} | ||||
| 
 | ||||
| impl RenderLatexEnvironment { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &ILatexEnvironment, | ||||
|     ) -> Result<RenderLatexEnvironment, CustomError> { | ||||
|         Ok(RenderLatexEnvironment {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::ILatexFragment; | ||||
| pub(crate) struct RenderLatexFragment {} | ||||
| 
 | ||||
| impl RenderLatexFragment { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &ILatexFragment, | ||||
|     ) -> Result<RenderLatexFragment, CustomError> { | ||||
|         Ok(RenderLatexFragment {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::ILineBreak; | ||||
| pub(crate) struct RenderLineBreak {} | ||||
| 
 | ||||
| impl RenderLineBreak { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &ILineBreak, | ||||
|     ) -> Result<RenderLineBreak, CustomError> { | ||||
|         Ok(RenderLineBreak {}) | ||||
|  | ||||
| @ -67,10 +67,10 @@ pub(crate) enum RenderObject { | ||||
| } | ||||
| 
 | ||||
| impl RenderObject { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         object: &IObject, | ||||
|     ) -> Result<RenderObject, CustomError> { | ||||
|         match object { | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IOrgMacro; | ||||
| pub(crate) struct RenderOrgMacro {} | ||||
| 
 | ||||
| impl RenderOrgMacro { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IOrgMacro, | ||||
|     ) -> Result<RenderOrgMacro, CustomError> { | ||||
|         Ok(RenderOrgMacro {}) | ||||
|  | ||||
| @ -16,17 +16,25 @@ pub(crate) struct RenderParagraph { | ||||
| } | ||||
| 
 | ||||
| impl RenderParagraph { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         paragraph: &IParagraph, | ||||
|     ) -> Result<RenderParagraph, CustomError> { | ||||
|         let children = paragraph | ||||
|             .children | ||||
|             .iter() | ||||
|             .map(|obj| RenderObject::new(config, &output_directory, &output_file, obj)) | ||||
|             .collect::<Result<Vec<_>, _>>()?; | ||||
|         let children = { | ||||
|             let mut ret = Vec::new(); | ||||
|             for obj in paragraph.children.iter() { | ||||
|                 ret.push(RenderObject::new( | ||||
|                     config, | ||||
|                     &output_directory, | ||||
|                     &output_file, | ||||
|                     obj, | ||||
|                 )?); | ||||
|             } | ||||
|             ret | ||||
|         }; | ||||
| 
 | ||||
|         Ok(RenderParagraph { children }) | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IPlainLink; | ||||
| pub(crate) struct RenderPlainLink {} | ||||
| 
 | ||||
| impl RenderPlainLink { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         comment: &IPlainLink, | ||||
|     ) -> Result<RenderPlainLink, CustomError> { | ||||
|         Ok(RenderPlainLink {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IPlainList; | ||||
| pub(crate) struct RenderPlainList {} | ||||
| 
 | ||||
| impl RenderPlainList { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IPlainList, | ||||
|     ) -> Result<RenderPlainList, CustomError> { | ||||
|         Ok(RenderPlainList {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IPlainText; | ||||
| pub(crate) struct RenderPlainText {} | ||||
| 
 | ||||
| impl RenderPlainText { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         heading: &IPlainText, | ||||
|     ) -> Result<RenderPlainText, CustomError> { | ||||
|         Ok(RenderPlainText {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IPlanning; | ||||
| pub(crate) struct RenderPlanning {} | ||||
| 
 | ||||
| impl RenderPlanning { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IPlanning, | ||||
|     ) -> Result<RenderPlanning, CustomError> { | ||||
|         Ok(RenderPlanning {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IPropertyDrawer; | ||||
| pub(crate) struct RenderPropertyDrawer {} | ||||
| 
 | ||||
| impl RenderPropertyDrawer { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IPropertyDrawer, | ||||
|     ) -> Result<RenderPropertyDrawer, CustomError> { | ||||
|         Ok(RenderPropertyDrawer {}) | ||||
|  | ||||
| @ -12,10 +12,10 @@ use crate::intermediate::IQuoteBlock; | ||||
| pub(crate) struct RenderQuoteBlock {} | ||||
| 
 | ||||
| impl RenderQuoteBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|     pub(crate) fn new( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         output_directory: &Path, | ||||
|         output_file: &Path, | ||||
|         original: &IQuoteBlock, | ||||
|     ) -> Result<RenderQuoteBlock, CustomError> { | ||||
|         Ok(RenderQuoteBlock {}) | ||||
|  | ||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander