diff --git a/projects/panduck-dioxus/Cargo.toml b/projects/panduck-dioxus/Cargo.toml deleted file mode 100644 index 2307228..0000000 --- a/projects/panduck-dioxus/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "panduck-dioxus" -version = "0.1.0" -authors = ["Aster <192607617@qq.com>"] -description = "use panduck to generate dioxus vdom" -repository = "https://github.com/oovm/panduck" -readme = "../../readme.md" -license = "MPL-2.0" -edition = "2018" - -[dependencies] -notedown_ast = "0.16.3" -notedown-error = "1.1.10" - -[dependencies.panduck-html] -version = "0.1.0" -path = "../panduck-html" -default-features = false - -[dependencies.dioxus] -version = "0.2.4" -features = ["ssr"] - -[dev-dependencies.panduck-core] -version = "0.1.3" -path = "../panduck-core" -features = ["markdown", "html", "rst"] - -[features] -default = ["server"] -server = ["panduck-html/katex", "panduck-html/syntect", ] - -[package.metadata.wee] -t = "cargo test" -p = "cargo publish --allow-dirty" diff --git a/projects/panduck-dioxus/readme.md b/projects/panduck-dioxus/readme.md deleted file mode 100644 index 9bd12fc..0000000 --- a/projects/panduck-dioxus/readme.md +++ /dev/null @@ -1 +0,0 @@ -# Counting lib \ No newline at end of file diff --git a/projects/panduck-dioxus/rustfmt.toml b/projects/panduck-dioxus/rustfmt.toml deleted file mode 100644 index 5f6b2cd..0000000 --- a/projects/panduck-dioxus/rustfmt.toml +++ /dev/null @@ -1,7 +0,0 @@ -version = "Two" -edition = "2018" -max_width = 128 - -imports_granularity = "Crate" -use_small_heuristics = "Max" -control_brace_style = "ClosingNextLine" \ No newline at end of file diff --git a/projects/panduck-dioxus/src/builder/config/mod.rs b/projects/panduck-dioxus/src/builder/config/mod.rs deleted file mode 100644 index 10e159e..0000000 --- a/projects/panduck-dioxus/src/builder/config/mod.rs +++ /dev/null @@ -1,27 +0,0 @@ -use panduck_html::{CodeConfig, ImageConfig, MathConfig}; - -use super::*; - -pub struct DioxusConfig { - pub trust_raw_html: bool, - pub image_config: ImageConfig, - pub code_config: CodeConfig, - pub math_config: MathConfig, -} - -impl Default for DioxusConfig { - fn default() -> Self { - Self { - trust_raw_html: false, - image_config: Default::default(), - code_config: Default::default(), - math_config: Default::default(), - } - } -} - -impl DioxusConfig { - pub fn into_builder(self) -> DioxusBuilder { - DioxusBuilder { config: self, context: Default::default() } - } -} diff --git a/projects/panduck-dioxus/src/builder/context/mod.rs b/projects/panduck-dioxus/src/builder/context/mod.rs deleted file mode 100644 index d4e73e4..0000000 --- a/projects/panduck-dioxus/src/builder/context/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -use super::*; - -pub struct DioxusContext {} - -impl Default for DioxusContext { - fn default() -> Self { - Self {} - } -} diff --git a/projects/panduck-dioxus/src/builder/mod.rs b/projects/panduck-dioxus/src/builder/mod.rs deleted file mode 100644 index e034449..0000000 --- a/projects/panduck-dioxus/src/builder/mod.rs +++ /dev/null @@ -1,57 +0,0 @@ -use dioxus::prelude::LazyNodes; -use notedown_ast::ASTNode; - -use crate::traits::IntoDioxus; - -pub use self::{config::DioxusConfig, context::DioxusContext}; - -mod config; -mod context; - -#[derive(Default)] -pub struct DioxusBuilder { - config: DioxusConfig, - context: DioxusContext, -} - -impl DioxusBuilder { - /// the html fragment - pub fn render(&mut self, ast: ASTNode) -> String { - todo!() - // let node = ast.into_sycamore(&self.config, &mut self.context); - // let view = View::::new_node(node); - // render_to_string(|| view) - } - /// a complete html - pub fn render_standalone(&mut self, ast: ASTNode) -> String { - todo!() - // let node = ast.into_sycamore(&self.config, &mut self.context); - // let html = SsrNode::element("html"); - // html.append_child(&self.html_head()); - // html.append_child(&node); - // render_to_string(|| View::new_node(html)) - } - - fn html_head(&self) -> LazyNodes { - todo!() - // let head: G = GenericNode::element_from_tag("head"); - // head.append_child(&{ - // let meta: G = GenericNode::element_from_tag("meta"); - // meta.set_attribute("charset", "UTF-8"); - // meta - // }); - // head.append_child(&{ - // let meta: G = GenericNode::element_from_tag("meta"); - // meta.set_attribute("name", "viewport-8"); - // meta.set_attribute("content", "'width=device-width, initial-scale=1.0'"); - // meta - // }); - // head.append_child(&{ - // let meta: G = GenericNode::element_from_tag("link"); - // meta.set_attribute("rel", "stylesheet"); - // meta.set_attribute("href", "https://latex.now.sh/style.css"); - // meta - // }); - // return head; - } -} diff --git a/projects/panduck-dioxus/src/lib.rs b/projects/panduck-dioxus/src/lib.rs deleted file mode 100644 index cf212b9..0000000 --- a/projects/panduck-dioxus/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub use builder::*; - -mod builder; -// mod shared; -mod traits; diff --git a/projects/panduck-dioxus/src/shared/mod.rs b/projects/panduck-dioxus/src/shared/mod.rs deleted file mode 100644 index 1311510..0000000 --- a/projects/panduck-dioxus/src/shared/mod.rs +++ /dev/null @@ -1,53 +0,0 @@ -use notedown_error::Result; -use sycamore::prelude::GenericNode; - -use crate::{ - builder::{SycamoreBuilder, SycamoreConfig, SycamoreContext}, - traits::IntoSycamore, -}; - -pub fn error_inline(msg: &str) -> G { - let node: G = GenericNode::element_from_tag("span"); - node.set_class_name("debug-error"); - node.update_inner_text(msg); - node -} - -// pub fn error_block(msg: &str) -> G { -// let node: G = GenericNode::element_from_tag("p"); -// node.set_class_name("debug-error"); -// node.update_inner_text(msg); -// return node; -// } - -pub fn push_nodes(node: &G, children: Vec, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -where - G: GenericNode, - T: IntoSycamore, -{ - for i in children { - node.append_child(&i.into_sycamore(cfg, ctx)) - } -} - -pub fn unwrap_inner(node: G) -> G { - match node.first_child() { - Some(s) => s, - #[cfg(debug_assertions)] - None => panic!("Illegal HTML content"), - #[cfg(not(debug_assertions))] - None => GenericNode::marker(), - } -} - -pub fn phantom_node(html: Result) -> G { - let g: G = GenericNode::element_from_tag("Phantom"); - match html { - Ok(o) => g.dangerously_set_inner_html(&o), - #[cfg(debug_assertions)] - Err(e) => return error_inline(e.to_string().as_str()), - #[cfg(not(debug_assertions))] - Err(_) => return GenericNode::marker(), - }; - unwrap_inner(g) -} diff --git a/projects/panduck-dioxus/src/traits/header/mod.rs b/projects/panduck-dioxus/src/traits/header/mod.rs deleted file mode 100644 index f95edce..0000000 --- a/projects/panduck-dioxus/src/traits/header/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -use super::*; - -impl IntoDioxus for Header { - fn into_dioxus(self, cx: Scope) -> Element { - let level = self.level; - let id = self.id.as_str(); - let children = self.children.into_iter().map(|e| e.into_dioxus(cx)); - cx.render(LazyNodes::new_some(move |f: NodeFactory| -> VNode { - let attributes = f.bump().alloc([f.attr("id", format_args!("{}", id), None, false)]); - let children = f.bump().alloc([f.fragment_from_iter(children)]); - match level { - 1 => f.element(dioxus_elements::h1, &[], attributes, children, None), - 2 => f.element(dioxus_elements::h2, &[], attributes, children, None), - 3 => f.element(dioxus_elements::h3, &[], attributes, children, None), - 4 => f.element(dioxus_elements::h4, &[], attributes, children, None), - 5 => f.element(dioxus_elements::h5, &[], attributes, children, None), - _ => f.element(dioxus_elements::h6, &[], attributes, children, None), - } - })) - } -} diff --git a/projects/panduck-dioxus/src/traits/mod.rs b/projects/panduck-dioxus/src/traits/mod.rs deleted file mode 100644 index 419ef2e..0000000 --- a/projects/panduck-dioxus/src/traits/mod.rs +++ /dev/null @@ -1,72 +0,0 @@ -use dioxus::{ - core::{DioxusElement, Element, LazyNodes, NodeFactory, Scope}, - prelude::{VNode, *}, -}; -use notedown_ast::{ - nodes::{CodeNode, Delimiter, Header, ListView, Literal, MathNode, StyleKind, StyleNode, TableView, TextSpan}, - ASTKind, -}; - -use crate::{DioxusBuilder, DioxusConfig, DioxusContext}; - -mod header; - -pub trait IntoDioxus { - fn into_dioxus(self, cx: Scope) -> Element; -} - -impl IntoDioxus for Literal -where - T: IntoDioxus, -{ - fn into_dioxus(self, cx: Scope) -> Element { - self.value.into_dioxus(cx) - } -} - -impl IntoDioxus for ASTKind { - fn into_dioxus(self, cx: Scope) -> Element { - match self { - Self::Statements(_) => { - unimplemented!() - } - Self::Paragraph(_) => { - unimplemented!() - } - Self::Delimiter(_) => { - unimplemented!() - } - Self::Header(h) => h.into_dioxus(cx), - Self::TableView(_) => { - unimplemented!() - } - Self::ListView(_) => { - unimplemented!() - } - Self::QuoteNode(_) => { - unimplemented!() - } - Self::CodeNode(_) => { - unimplemented!() - } - Self::MathNode(_) => { - unimplemented!() - } - Self::LinkNode(_) => { - unimplemented!() - } - Self::TextSpan(_) => { - unimplemented!() - } - Self::StyledSpan(_) => { - unimplemented!() - } - Self::Command(_) => { - unimplemented!() - } - Self::Value(_) => { - unimplemented!() - } - } - } -} diff --git a/projects/panduck-dioxus/tests/docx/basic.docx b/projects/panduck-dioxus/tests/docx/basic.docx deleted file mode 100644 index b7e6e96..0000000 Binary files a/projects/panduck-dioxus/tests/docx/basic.docx and /dev/null differ diff --git a/projects/panduck-dioxus/tests/docx/basic.html b/projects/panduck-dioxus/tests/docx/basic.html deleted file mode 100644 index e69de29..0000000 diff --git a/projects/panduck-dioxus/tests/docx/mod.rs b/projects/panduck-dioxus/tests/docx/mod.rs deleted file mode 100644 index 59e9c00..0000000 --- a/projects/panduck-dioxus/tests/docx/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ -// use docx_rs::read_docx; -// -// #[test] -// fn test() { -// let buf: &[u8] = include_bytes!("basic.docx"); -// let docx = read_docx(buf).unwrap(); -// println!("{:#?}", docx) -// } diff --git a/projects/panduck-dioxus/tests/docx/style.docx b/projects/panduck-dioxus/tests/docx/style.docx deleted file mode 100644 index 99223fe..0000000 Binary files a/projects/panduck-dioxus/tests/docx/style.docx and /dev/null differ diff --git a/projects/panduck-dioxus/tests/docx/style.html b/projects/panduck-dioxus/tests/docx/style.html deleted file mode 100644 index e69de29..0000000 diff --git a/projects/panduck-dioxus/tests/html/mod.rs b/projects/panduck-dioxus/tests/html/mod.rs deleted file mode 100644 index 8b13789..0000000 --- a/projects/panduck-dioxus/tests/html/mod.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/projects/panduck-dioxus/tests/jupyter/ipython.html b/projects/panduck-dioxus/tests/jupyter/ipython.html deleted file mode 100644 index d32a7a6..0000000 --- a/projects/panduck-dioxus/tests/jupyter/ipython.html +++ /dev/null @@ -1,4 +0,0 @@ -
-<img src="../images/ipython_logo.png">
-
-

Back to the main

IPython Kernel

IPython provides extensions to the Python programming language that make working interactively convenient and efficient. These extensions are implemented in the IPython Kernel and are available in all of the IPython Frontends (Notebook, Terminal, Console and Qt Console) when running this kernel.

Tutorials

  • [Cell Magics](Cell Magics.ipynb)

  • [Script Magics](Script Magics.ipynb)

  • [Rich Output](Rich Output.ipynb)

  • [Custom Display Logic](Custom Display Logic.ipynb)

  • [Plotting in the Notebook](Plotting in the Notebook.ipynb)

  • [Capturing Output](Capturing Output.ipynb)

Examples

  • [Background Jobs](Background Jobs.ipynb)

  • [Trapezoid Rule](Trapezoid Rule.ipynb)

  • [Raw Input in the Notebook](Raw Input in the Notebook.ipynb)

  • [Importing Notebooks](Importing Notebooks.ipynb)

Non-notebook examples

This directory also contains examples that are regular Python (.py) files.

There are also a set of examples that show how to integrate IPython with different GUI event loops:

\ No newline at end of file diff --git a/projects/panduck-dioxus/tests/jupyter/ipython.json b/projects/panduck-dioxus/tests/jupyter/ipython.json deleted file mode 100644 index 8ff7e9a..0000000 --- a/projects/panduck-dioxus/tests/jupyter/ipython.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Back to the main [Index](../Index.ipynb)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# IPython Kernel" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "IPython provides extensions to the Python programming language that make working interactively convenient and efficient. These extensions are implemented in the IPython Kernel and are available in all of the IPython Frontends (Notebook, Terminal, Console and Qt Console) when running this kernel." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Tutorials" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "* [Cell Magics](Cell Magics.ipynb)\n", - "* [Script Magics](Script Magics.ipynb)\n", - "* [Rich Output](Rich Output.ipynb)\n", - "* [Custom Display Logic](Custom Display Logic.ipynb)\n", - "* [Plotting in the Notebook](Plotting in the Notebook.ipynb)\n", - "* [Capturing Output](Capturing Output.ipynb)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Examples" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "* [Background Jobs](Background Jobs.ipynb)\n", - "* [Trapezoid Rule](Trapezoid Rule.ipynb)\n", - "* [SymPy](SymPy.ipynb)\n", - "* [Raw Input in the Notebook](Raw Input in the Notebook.ipynb)\n", - "* [Importing Notebooks](Importing Notebooks.ipynb)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Non-notebook examples" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This directory also contains examples that are regular Python (`.py`) files." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "example-demo.py
" - ], - "text/plain": [ - "/Users/minrk/dev/ip/mine/examples/IPython Kernel/example-demo.py" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "ipython-get-history.py
" - ], - "text/plain": [ - "/Users/minrk/dev/ip/mine/examples/IPython Kernel/ipython-get-history.py" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%run ../utils/list_pyfiles.ipy" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "There are also a set of examples that show how to integrate IPython with different GUI event loops:" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "data/
\n", - "  flare.json
" - ], - "text/plain": [ - "data/\n", - " flare.json" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "gui/
\n", - "  gui-glut.py
\n", - "  gui-gtk.py
\n", - "  gui-gtk3.py
\n", - "  gui-pyglet.py
\n", - "  gui-qt.py
\n", - "  gui-tk.py
\n", - "  gui-wx.py
" - ], - "text/plain": [ - "gui/\n", - " gui-glut.py\n", - " gui-gtk.py\n", - " gui-gtk3.py\n", - " gui-pyglet.py\n", - " gui-qt.py\n", - " gui-tk.py\n", - " gui-wx.py" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%run ../utils/list_subdirs.ipy" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.4.3" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/jupyter/mod.rs b/projects/panduck-dioxus/tests/jupyter/mod.rs deleted file mode 100644 index 451a089..0000000 --- a/projects/panduck-dioxus/tests/jupyter/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -use super::*; - -pub fn html_standalone(source: &str, target: &str) -> Result<()> { - html_standalone_builder(panduck_core::convert::parse_jupyter)(source, target) -} - -#[test] -fn md_full() -> Result<()> { - html_standalone(include_str!("ipython.json"), include_str!("ipython.html"))?; - Ok(()) -} diff --git a/projects/panduck-dioxus/tests/jupyter/readme.md b/projects/panduck-dioxus/tests/jupyter/readme.md deleted file mode 100644 index e69de29..0000000 diff --git a/projects/panduck-dioxus/tests/main.rs b/projects/panduck-dioxus/tests/main.rs deleted file mode 100644 index f9d8e9b..0000000 --- a/projects/panduck-dioxus/tests/main.rs +++ /dev/null @@ -1,33 +0,0 @@ -// use notedown_ast::ASTNode; -// -// use panduck_core::Result; -// use panduck_sycamore::SycamoreConfig; -// -// mod docx; -// mod html; -// mod jupyter; -// mod markdown; -// mod rst; -// -#[test] -fn ready() { - println!("it works!") -} -// -// pub fn html_fragment_builder(parser: fn(&str) -> Result) -> impl FnOnce(&str, &str) -> Result<()> { -// move |source, target| { -// let mut builder = SycamoreConfig::default().into_builder(); -// let ast = parser(source)?; -// assert_eq!(builder.render(ast), target); -// Ok(()) -// } -// } -// -// pub fn html_standalone_builder(parser: fn(&str) -> Result) -> impl FnOnce(&str, &str) -> Result<()> { -// move |source, target| { -// let mut builder = SycamoreConfig::default().into_builder(); -// let ast = parser(source)?; -// assert_eq!(builder.render_standalone(ast), target); -// Ok(()) -// } -// } diff --git a/projects/panduck-dioxus/tests/markdown/Readme.md b/projects/panduck-dioxus/tests/markdown/Readme.md deleted file mode 100644 index 978a49c..0000000 --- a/projects/panduck-dioxus/tests/markdown/Readme.md +++ /dev/null @@ -1 +0,0 @@ -Find test at: [github/cmark-gfm/test](https://github.com/github/cmark-gfm/tree/master/test) \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/markdown/basic.html b/projects/panduck-dioxus/tests/markdown/basic.html deleted file mode 100644 index e16c10e..0000000 --- a/projects/panduck-dioxus/tests/markdown/basic.html +++ /dev/null @@ -1,110 +0,0 @@ -

markdown-mode Test Cases

1. Lists

Unordered lists:

  • This is a bullet point.

    • This is a sub bullet point.

  • This is another bullet point.

Ordered lists:

  1. This is an ordered list

  2. With a second element.

  3. And a forty-fourth element.

  4. Remember, Markdown doesn’t care which number you use.

List items with bold and italic:

  • This is a list item in italics, just a test.

  • List item in italics.

  • This is a list item in bold, just a test.

  • List item in bold.

Bold and italic phrases at the beginning of lines:

not a list -also not a list

2. Blockquotes

this is a test -of the blockquote mechanism

3. Two Inline Links on One Line

Contributed by Ryan Barrett on 2007-07-02

thanks! the new version 1.4 works great. very cool.

i did notice a minor bug. if there are two inline links in the same line, e.g. - baz , it colors the text between the links (baz) as well.

i’m guessing this is because the inline link regexp is greedy. if you switch -it to non-greedy - if elisp can do that - or to something like ‘[And this is a valid reference definition!]+]’ if -not, that might do the trick.

4. Empty Inline Links

- -

5. Bold and Italics on the Same Line

Contributed by Conal Elliott on 2007-08-27

By the way, here are two syntax-highlighting glitches I’ve seen so far:

foo and doo or ziddle zop -Oh – what’s happening here?

6. Reverse Order Italic then Bold

Why doesn’t the bold part get picked up? -ziddle zop or foo and doo

7. Two Inline Links in One Line

Contributed by Alastair Rankine on 2007-09-10

Thanks for this, I have been waiting for an emacs markdown mode for ages!

One minor quibble is in the highlighting of inline links. As currently -(1.4) implemented the presence of a close paren on the same line as an -inline link will highlight the link and the subsequent text:

[blah](this bit will be highlighted) and so (will this bit)

I think this is because of greedy regexes. Here is a simple patch to address.

8. Reference-Style Link with a Space

Here’s a [link] with a space between the components.

9. Inline Code

Single backtick code fragments as well as double`backtick fragments are -supported.

10. Single Underscore and Asterisk

This is a _ single underscore and a * single asterisk. -They should not trigger font locking.

11. Double Underscores and Asterisks

Neither should a double **asterisk and double__ underscore!

12. List-Like Strings in Preformatted Text

To make lists look nice, you can wrap items with hanging indents:

-*   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
-    Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
-    viverra nec, fringilla in, laoreet vitae, risus.
-*   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
-    Suspendisse id sem consectetuer libero luctus adipiscing.
-
-

13. Multi-Line Italic and Bold

bold phrase spanning -two lines asdf same line test

italic phrase spanning -two lines italic same line test

14. Reference Links

This document was created in GNU Emacs using . It provides -syntax highlighting for Markdown Homepage documents which allows reference-style -links like these. The reference definitions can even contain alternate -text such as Alternate Text.

15. Escaping

ab *literal asterisks* asdf inside * literal asterisks asd lkj

ab *this should be italic* yz
ab *this should be italic* yz
ab *this should be italic* yz
ab *this should be italic* yz

16. Single Letter and Word on Same Line

a single a bold letter and bold word test asdf
a single a italic letter and italic word test asdf
a single a bold letter and bold word test asdf
a single a italic letter italic word test asdf

17. Hanging Indents

  • An exclamation mark: !;

  • followed by a set of square brackets, containing the alt -attribute text for the image;

18. Links in Preformatted Text

Here’s an example of reference links in action:

-This document was created in GNU Emacs using [markdown-mode][].  It
-provides syntax highlighting for [Markdown][] documents which allows
-reference-style links like these.  The reference definitions can even
-contain alternate text such as [this one][id].
-
- [markdown-mode]: http://jrblevin.freeshell.org/software/markdown-mode
- [Markdown]:      http://daringfireball.net/projects/markdown
- [id]:            http://reference-link.com/with/alt "Alternate Text"
-
-

19. Slash-Star in Preformatted Text

-svn commit -m "Imported RCS project"
-svn add image.png binaries/*
-svn commit -m "Imported additional project files"
-
-

This text gets counted as part of the block quote too. But it can be ended -by a star-slash: */ It is as if markdown-mode is using C++ style comments.

Fixed by commit d81138d.

20. Underscores in Code Blocks

Contributed by shindo on 2008-01-20

-get_something_by_name()
-
-

21. Escaped Characters

Escaped backticks: `not code`

Escaped underscores: don’t_italicize_this

Escaped asterisks: *also not italic*

Escaped hash marks:
# This is not a heading

22. Adjacent Wiki Links

[[Two]] [[WikiLinks]] [[InARow]]

23. SmartyPants

This is a test of “SmartyPants,” a progrm written by John Gruber for -generating typographically correct HTML entities–ones such as -the em-dash and ellipsis…

24. Horizontal Rules




25. Asterisks and Underscores Across Blocks

Asterisks *should

not match across* block boundaries.

Underscores _should

not match across_ block boundaries.

Double Asterisks **should

not match across** block boundaries.

Double underscores __should

not match across__ block boundaries.

But, this should still match.

So should this.

Addressed by commit d81138d.

26. Underscores Within Words

Code fragments can_have_underscores_inside_like this.

27. Code Blocks Spanning Lines

Markdown allows code fragments to span across lines.

Let’s make sure that double` backtick`code fragments work -this way too.

However, they should `not

match` across blocks.

Here’s another valid one.

28. Pre Blocks and Nested Lists

  • List level 1 item 1

  • List level 1 item 2

    This is a second paragraph, part of item 2.

    -This nested pre block should match
    -
    -    So should this
    -
    -

    Now we move back to the list.

  • List level 1 item 3

    • List level 2 item 1

      -Nested pre block
      -
      -
    • List level 2 item 2

      • List level 3 item 1

        -Nested pre block
        -
        -

29. Colon After Wiki Link

[[AnotherLink]]:note

30. Incorrect Parsing of List Paragraph

Contributed by Luciano Gerber on April 4, 2012.

It is interesting to see what happens when one queries -social upheaval and protopalatial era.

  • social upheaval: the following queries have been tried:

    social upheaval subClassOf

The preceding text should not be matched as a preformatted block.

31. Footnotes

This is a footnote marker,[^1] but this is not.And this is a valid reference definition!

32. Carat as Implicit Reference Link

This is a valid markdown link: And this is a valid reference definition!

33. Email Address Inside Bold and Italic Spans

Lorem amet.

Lorem amet.

34. URL Inside Bold and Italic Spans

markdown-mode homepage

markdown-mode homepage

35. Complex Preformatted Code Block

-class Employee < ActiveRecord::Base
-  attr_accessible :github_username, :name
-
-  def self.syncify!
-    begin
-      employee_sync = GitOrganized::GithubEmployeeSync.new(
-        GitOrganized::Organization.new(
-          GitOrganized.config.default_org,
-          ["employees-pull", "employees-push"]
-        ),
-        Sources.new
-      )
-
-      employee_sync.sync
-    rescue Github::Error::ServiceError => e
-      retry
-    end
-  end
-
-  after_save do |employee| Employee.syncify! end
-  after_destroy do |employee| Employee.syncify! end
-end
-
-

36. Fenced Code Blocks

Fenced code blocks begin with three or more tildes and end with a line -with at least as many tildes.

-program hello
-  implicit none
-  print '(a)', 'Hello, world!'
-end program hello
-
-

They may also have a lang attribute.

-program hello
-  implicit none
-  print '(a)', 'Hello, world!'
-end program hello
-
-

In Kramdown, one specifies the language identifier as follows:

-program hello
-  implicit none
-  print '(a)', 'Hello, world!'
-end program hello
-
-

or with a Maruku-style inline attribute list

-program hello
-  implicit none
-  print '(a)', 'Hello, world!'
-end program hello
-
-

{: .language-fortran}

\ No newline at end of file diff --git a/projects/panduck-dioxus/tests/markdown/basic.md b/projects/panduck-dioxus/tests/markdown/basic.md deleted file mode 100644 index 40b48da..0000000 --- a/projects/panduck-dioxus/tests/markdown/basic.md +++ /dev/null @@ -1,420 +0,0 @@ -markdown-mode Test Cases -======================== - -## 1. Lists - -Unordered lists: - -- This is a bullet point. - - This is a sub bullet point. -- This is another bullet point. - -Ordered lists: - -1. This is an ordered list -2. With a second element. -44. And a forty-fourth element. -3. Remember, Markdown doesn't care which number you use. - -List items with bold and italic: - -> * This is a list item *in italics*, just a test. -> * *List item in italics.* -> * This is a list item **in bold**, just a test. -> * **List item in bold.** - -Bold and italic phrases at the beginning of lines: - -*not a list* -**also not a list** - - -## 2. Blockquotes - - -> this is a test -> of the blockquote mechanism - - -## 3. Two Inline Links on One Line - - -*Contributed by Ryan Barrett on 2007-07-02* - -thanks! the new version 1.4 works great. very cool. - -i did notice a minor bug. if there are two inline links in the same line, e.g. -[foo](bar) baz [foo](bar), it colors the text between the links (baz) as well. - -i'm guessing this is because the inline link regexp is greedy. if you switch -it to non-greedy - if elisp can do that - or to something like '\[[^]]+\]' if -not, that might do the trick. - - -## 4. Empty Inline Links - -[]() -[](asdf) -[asdf]() - - -## 5. Bold and Italics on the Same Line - -*Contributed by Conal Elliott on 2007-08-27* - -By the way, here are two syntax-highlighting glitches I've seen so far: - -**foo and doo** or *ziddle zop* -Oh -- what's happening here? - - -## 6. Reverse Order Italic then Bold - -Why doesn't the bold part get picked up? -*ziddle zop* or **foo and doo** - - -## 7. Two Inline Links in One Line - -*Contributed by Alastair Rankine on 2007-09-10* - -Thanks for this, I have been waiting for an emacs markdown mode for ages! - -One minor quibble is in the highlighting of inline links. As currently -(1.4) implemented the presence of a close paren on the same line as an -inline link will highlight the link and the subsequent text: - - [blah](this bit will be highlighted) and so (will this bit) - -I think this is because of greedy regexes. Here is a simple patch to address. - - -## 8. Reference-Style Link with a Space - -Here's a [link] [1] with a space between the components. - - [1]: http://daringfireball.net/projects/markdown/syntax - - -## 9. Inline Code - -Single `backtick code` fragments as well as ``double`backtick`` fragments are -supported. - - -## 10. Single Underscore and Asterisk - -This is a _ single underscore and a * single asterisk. -They should not trigger font locking. - - -## 11. Double Underscores and Asterisks - -Neither should a double **asterisk and double__ underscore! - -## 12. List-Like Strings in Preformatted Text - -To make lists look nice, you can wrap items with hanging indents: - - * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. - Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, - viverra nec, fringilla in, laoreet vitae, risus. - * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. - Suspendisse id sem consectetuer libero luctus adipiscing. - -## 13. Multi-Line Italic and Bold - -bold **phrase spanning -two lines** asdf **same line** test - -italic *phrase spanning -two lines* italic *same line* test - - -## 14. Reference Links - -This document was created in GNU Emacs using [markdown-mode][]. It provides -syntax highlighting for [Markdown][] documents which allows reference-style -links like these. The reference definitions can even contain alternate -text such as [this one][id]. - - [markdown-mode]: http://jrblevin.freeshell.org/software/markdown-mode - [Markdown]: http://daringfireball.net/projects/markdown "Markdown Homepage" - [id]: http://reference-link.com/with/alt "Alternate Text" - - -## 15. Escaping - -ab \*literal asterisks\* asdf *inside \* literal asterisks* asd lkj - -ab \**this should be italic\** yz -ab \**this should be italic*\* yz -ab *\*this should be italic\** yz -ab *\*this should be italic*\* yz - - -## 16. Single Letter and Word on Same Line - -a single **a** bold letter and bold word **test** asdf -a single _a_ italic letter and italic word _test_ asdf -a single __a__ bold letter and bold word __test__ asdf -a single *a* italic letter italic word *test* asdf - - -## 17. Hanging Indents - -* An exclamation mark: `!`; -* followed by a set of square brackets, containing the `alt` - attribute text for the image; - - -## 18. Links in Preformatted Text - -Here's an example of reference links in action: - - This document was created in GNU Emacs using [markdown-mode][]. It - provides syntax highlighting for [Markdown][] documents which allows - reference-style links like these. The reference definitions can even - contain alternate text such as [this one][id]. - - [markdown-mode]: http://jrblevin.freeshell.org/software/markdown-mode - [Markdown]: http://daringfireball.net/projects/markdown - [id]: http://reference-link.com/with/alt "Alternate Text" - - -## 19. Slash-Star in Preformatted Text - - svn commit -m "Imported RCS project" - svn add image.png binaries/* - svn commit -m "Imported additional project files" - -This text gets counted as part of the block quote too. But it can be ended -by a star-slash: */ It is as if `markdown-mode` is using C++ style comments. - -Fixed by commit d81138d. - - -## 20. Underscores in Code Blocks - -*Contributed by shindo on 2008-01-20* - - get_something_by_name() - - -## 21. Escaped Characters - -Escaped backticks: \`not code\` - -Escaped underscores: don't\_italicize\_this - -Escaped asterisks: \*also not italic\* - -Escaped hash marks: -\# This is not a heading - - -## 22. Adjacent Wiki Links - -[[Two]] [[WikiLinks]] [[InARow]] - - -## 23. SmartyPants - -This is a test of "SmartyPants," a progrm written by John Gruber for -generating typographically correct HTML entities--ones such as -the em-dash and ellipsis... - - -## 24. Horizontal Rules - -* * * * * - -- - - --- - - - - -* *** * * *** * * * - - -## 25. Asterisks and Underscores Across Blocks - -Asterisks *should - -not match across* block boundaries. - -Underscores _should - -not match across_ block boundaries. - -Double Asterisks **should - -not match across** block boundaries. - -Double underscores __should - -not match across__ block boundaries. - -But, *this should still match*. - -So should _this_. - -Addressed by commit d81138d. - - -## 26. Underscores Within Words - -Code fragments `can_have_underscores_inside_like` this. - - -## 27. Code Blocks Spanning Lines - -Markdown allows `code -fragments` to span across lines. - -Let's make sure that ``double` -backtick`code fragments`` work -this way too. - -However, they should `not - -match` across blocks. - -Here's another `valid` one. - - -## 28. Pre Blocks and Nested Lists - - - List level 1 item 1 - - List level 1 item 2 - - This is a second paragraph, part of item 2. - - This nested pre block should match - - So should this - - Now we move back to the list. - - - List level 1 item 3 - - - List level 2 item 1 - - Nested pre block - - - List level 2 item 2 - - - List level 3 item 1 - - Nested pre block - - -## 29. Colon After Wiki Link - -[[AnotherLink]]:note - - -## 30. Incorrect Parsing of List Paragraph - -*Contributed by Luciano Gerber on April 4, 2012.* - -It is interesting to see what happens when one queries -`social upheaval` and `protopalatial era`. - -* `social upheaval`: the following queries have been tried: - - social upheaval subClassOf - -The preceding text should not be matched as a preformatted block. - - -## 31. Footnotes - -This is a footnote marker,[^1] but this is not.[^] - -[^1]: And the definition of the footnote is here. - - [^2]: but this is preformatted text. - - -## 32. Carat as Implicit Reference Link - -This is a valid markdown link: [^][] - -[^]: http://jblevins.org/ "And this is a valid reference definition!" - - -## 33. Email Address Inside Bold and Italic Spans - -*Lorem amet.* - -**Lorem amet.** - - -## 34. URL Inside Bold and Italic Spans - -*markdown-mode homepage http://jblevins.org/projects/markdown-mode/* - -**markdown-mode homepage http://jblevins.org/projects/markdown-mode/** - -## 35. Complex Preformatted Code Block - - class Employee < ActiveRecord::Base - attr_accessible :github_username, :name - - def self.syncify! - begin - employee_sync = GitOrganized::GithubEmployeeSync.new( - GitOrganized::Organization.new( - GitOrganized.config.default_org, - ["employees-pull", "employees-push"] - ), - Sources.new - ) - - employee_sync.sync - rescue Github::Error::ServiceError => e - retry - end - end - - after_save do |employee| Employee.syncify! end - after_destroy do |employee| Employee.syncify! end - end - -## 36. Fenced Code Blocks - -Fenced code blocks begin with three or more tildes and end with a line -with at least as many tildes. - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -program hello - implicit none - print '(a)', 'Hello, world!' -end program hello -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -They may also have a `lang` attribute. - -~~~~~~~~~~~~~{: lang=fortran } -program hello - implicit none - print '(a)', 'Hello, world!' -end program hello -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In Kramdown, one specifies the language identifier as follows: - -~~~ fortran -program hello - implicit none - print '(a)', 'Hello, world!' -end program hello -~~~ - -or with a Maruku-style inline attribute list - -~~~ -program hello - implicit none - print '(a)', 'Hello, world!' -end program hello -~~~ -{: .language-fortran} \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/markdown/extensions.html b/projects/panduck-dioxus/tests/markdown/extensions.html deleted file mode 100644 index 705be68..0000000 --- a/projects/panduck-dioxus/tests/markdown/extensions.html +++ /dev/null @@ -1,797 +0,0 @@ -

title: Extensions test -author: Yuki Izumi -version: 0.1 -date: ‘2016-08-31’ -license: ‘’ -…

Tables

Here’s a well-formed table, doing everything it should.

-| abc | def |
-| --- | --- |
-| ghi | jkl |
-| mno | pqr |
-.
-<table>
-<thead>
-<tr>
-<th>abc</th>
-<th>def</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>ghi</td>
-<td>jkl</td>
-</tr>
-<tr>
-<td>mno</td>
-<td>pqr</td>
-</tr>
-</tbody>
-</table>
-
-

We’re going to mix up the table now; we’ll demonstrate that inline formatting -works fine, but block elements don’t. You can also have empty cells, and the -textual alignment of the columns is shown to be irrelevant.

-Hello!
-
-| _abc_ | セン |
-| ----- | ---- |
-| 1. Block elements inside cells don't work. | |
-| But _**inline elements do**_. | x |
-
-Hi!
-.
-<p>Hello!</p>
-<table>
-<thead>
-<tr>
-<th><em>abc</em></th>
-<th>セン</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>1. Block elements inside cells don't work.</td>
-<td></td>
-</tr>
-<tr>
-<td>But <em><strong>inline elements do</strong></em>.</td>
-<td>x</td>
-</tr>
-</tbody>
-</table>
-<p>Hi!</p>
-
-

Here we demonstrate some edge cases about what is and isn’t a table.

-| Not enough table | to be considered table |
-
-| Not enough table | to be considered table |
-| Not enough table | to be considered table |
-
-| Just enough table | to be considered table |
-| ----------------- | ---------------------- |
-
-| ---- | --- |
-
-|x|
-|-|
-
-| xyz |
-| --- |
-.
-<p>| Not enough table | to be considered table |</p>
-<p>| Not enough table | to be considered table |
-| Not enough table | to be considered table |</p>
-<table>
-<thead>
-<tr>
-<th>Just enough table</th>
-<th>to be considered table</th>
-</tr>
-</thead>
-</table>
-<p>| ---- | --- |</p>
-<table>
-<thead>
-<tr>
-<th>x</th>
-</tr>
-</thead>
-</table>
-<table>
-<thead>
-<tr>
-<th>xyz</th>
-</tr>
-</thead>
-</table>
-
-

A “simpler” table, GFM style:

-abc | def
---- | ---
-xyz | ghi
-.
-<table>
-<thead>
-<tr>
-<th>abc</th>
-<th>def</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>xyz</td>
-<td>ghi</td>
-</tr>
-</tbody>
-</table>
-
-

We are making the parser slighly more lax here. Here is a table with spaces at -the end:

-Hello!
-
-| _abc_ | セン |
-| ----- | ---- |
-| this row has a space at the end | | 
-| But _**inline elements do**_. | x |
-
-Hi!
-.
-<p>Hello!</p>
-<table>
-<thead>
-<tr>
-<th><em>abc</em></th>
-<th>セン</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>this row has a space at the end</td>
-<td></td>
-</tr>
-<tr>
-<td>But <em><strong>inline elements do</strong></em>.</td>
-<td>x</td>
-</tr>
-</tbody>
-</table>
-<p>Hi!</p>
-
-

Table alignment:

-aaa | bbb | ccc | ddd | eee
-:-- | --- | :-: | --- | --:
-fff | ggg | hhh | iii | jjj
-.
-<table>
-<thead>
-<tr>
-<th align="left">aaa</th>
-<th>bbb</th>
-<th align="center">ccc</th>
-<th>ddd</th>
-<th align="right">eee</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left">fff</td>
-<td>ggg</td>
-<td align="center">hhh</td>
-<td>iii</td>
-<td align="right">jjj</td>
-</tr>
-</tbody>
-</table>
-
-

Table cell count mismatches

The header and marker row must match.

-| a | b | c |
-| --- | --- |
-| this | isn't | okay |
-.
-<p>| a | b | c |
-| --- | --- |
-| this | isn't | okay |</p>
-
-

But any of the body rows can be shorter. Rows longer -than the header are truncated.

-| a | b | c |
-| --- | --- | ---
-| x
-| a | b
-| 1 | 2 | 3 | 4 | 5 |
-.
-<table>
-<thead>
-<tr>
-<th>a</th>
-<th>b</th>
-<th>c</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>x</td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td>a</td>
-<td>b</td>
-<td></td>
-</tr>
-<tr>
-<td>1</td>
-<td>2</td>
-<td>3</td>
-</tr>
-</tbody>
-</table>
-
-

Embedded pipes

Tables with embedded pipes could be tricky.

-| a | b |
-| --- | --- |
-| Escaped pipes are \|okay\|. | Like \| this. |
-| Within `\|code\| is okay` too. |
-| _**`c\|`**_ \| complex
-| don't **\_reparse\_**
-.
-<table>
-<thead>
-<tr>
-<th>a</th>
-<th>b</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>Escaped pipes are |okay|.</td>
-<td>Like | this.</td>
-</tr>
-<tr>
-<td>Within <code>|code| is okay</code> too.</td>
-<td></td>
-</tr>
-<tr>
-<td><em><strong><code>c|</code></strong></em> | complex</td>
-<td></td>
-</tr>
-<tr>
-<td>don't <strong>_reparse_</strong></td>
-<td></td>
-</tr>
-</tbody>
-</table>
-
-

Oddly-formatted markers

This shouldn’t assert.

-| a |
---- |
-.
-<table>
-<thead>
-<tr>
-<th>a</th>
-</tr>
-</thead>
-</table>
-
-

Escaping

-| a | b |
-| --- | --- |
-| \\ | `\\` |
-| \\\\ | `\\\\` |
-| \_ | `\_` |
-| \| | `\|` |
-| \a | `\a` |
-
-\\ `\\`
-
-\\\\ `\\\\`
-
-\_ `\_`
-
-\| `\|`
-
-\a `\a`
-.
-<table>
-<thead>
-<tr>
-<th>a</th>
-<th>b</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>\</td>
-<td><code>\\</code></td>
-</tr>
-<tr>
-<td>\\</td>
-<td><code>\\\\</code></td>
-</tr>
-<tr>
-<td>_</td>
-<td><code>\_</code></td>
-</tr>
-<tr>
-<td>|</td>
-<td><code>|</code></td>
-</tr>
-<tr>
-<td>\a</td>
-<td><code>\a</code></td>
-</tr>
-</tbody>
-</table>
-<p>\ <code>\\</code></p>
-<p>\\ <code>\\\\</code></p>
-<p>_ <code>\_</code></p>
-<p>| <code>\|</code></p>
-<p>\a <code>\a</code></p>
-
-

Embedded HTML

-| a |
-| --- |
-| <strong>hello</strong> |
-| ok <br> sure |
-.
-<table>
-<thead>
-<tr>
-<th>a</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td><strong>hello</strong></td>
-</tr>
-<tr>
-<td>ok <br> sure</td>
-</tr>
-</tbody>
-</table>
-
-

Reference-style links

-Here's a link to [Freedom Planet 2][].
-
-| Here's a link to [Freedom Planet 2][] in a table header. |
-| --- |
-| Here's a link to [Freedom Planet 2][] in a table row. |
-
-[Freedom Planet 2]: http://www.freedomplanet2.com/
-.
-<p>Here's a link to <a href="http://www.freedomplanet2.com/">Freedom Planet 2</a>.</p>
-<table>
-<thead>
-<tr>
-<th>Here's a link to <a href="http://www.freedomplanet2.com/">Freedom Planet 2</a> in a table header.</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>Here's a link to <a href="http://www.freedomplanet2.com/">Freedom Planet 2</a> in a table row.</td>
-</tr>
-</tbody>
-</table>
-
-

Sequential cells

-| a | b | c |
-| --- | --- | --- |
-| d || e |
-.
-<table>
-<thead>
-<tr>
-<th>a</th>
-<th>b</th>
-<th>c</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>d</td>
-<td></td>
-<td>e</td>
-</tr>
-</tbody>
-</table>
-
-

Interaction with emphasis

-| a | b |
-| --- | --- |
-|***(a)***|
-.
-<table>
-<thead>
-<tr>
-<th>a</th>
-<th>b</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td><em><strong>(a)</strong></em></td>
-<td></td>
-</tr>
-</tbody>
-</table>
-
-

a table can be recognised when separated from a paragraph of text without an empty line

-123
-456
-| a | b |
-| ---| --- |
-d | e
-.
-<p>123
-456</p>
-<table>
-<thead>
-<tr>
-<th>a</th>
-<th>b</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>d</td>
-<td>e</td>
-</tr>
-</tbody>
-</table>
-
-

Strikethroughs

A well-formed strikethrough.

-A proper ~strikethrough~.
-.
-<p>A proper <del>strikethrough</del>.</p>
-
-

Some strikethrough edge cases.

-These are ~not strikethroughs.
-
-No, they are not~
-
-This ~is ~ legit~ isn't ~ legit.
-
-This is not ~~~~~one~~~~~ huge strikethrough.
-
-~one~ ~~two~~ ~~~three~~~
-
-No ~mismatch~~
-.
-<p>These are ~not strikethroughs.</p>
-<p>No, they are not~</p>
-<p>This <del>is ~ legit</del> isn't ~ legit.</p>
-<p>This is not ~~~~~one~~~~~ huge strikethrough.</p>
-<p><del>one</del> <del>two</del> ~~~three~~~</p>
-<p>No ~mismatch~~</p>
-
-

Using 200 tilde since it overflows the internal buffer -size (100) for parsing delimiters in inlines.c

-
-## Autolinks
-
-```````````````````````````````` example
-: http://google.com https://google.com
-
-<http://google.com/å> http://google.com/å
-
-scyther@pokemon.com
-
-www.github.com www.github.com/á
-
-www.google.com/a_b
-
-**Autolink and http://inlines**
-
-![http://inline.com/image](http://inline.com/image)
-
-a.w@b.c
-
-Full stop outside parens shouldn't be included http://google.com/ok.
-
-(Full stop inside parens shouldn't be included http://google.com/ok.)
-
-"http://google.com"
-
-'http://google.com'
-
-http://🍄.ga/ http://x🍄.ga/
-.
-<p>: <a href="http://google.com">http://google.com</a> <a href="https://google.com">https://google.com</a></p>
-<p><a href="http://google.com/%C3%A5">http://google.com/å</a> <a href="http://google.com/%C3%A5">http://google.com/å</a></p>
-<p><a href="mailto:scyther@pokemon.com">scyther@pokemon.com</a></p>
-<p><a href="http://www.github.com">www.github.com</a> <a href="http://www.github.com/%C3%A1">www.github.com/á</a></p>
-<p><a href="http://www.google.com/a_b">www.google.com/a_b</a></p>
-<p><strong>Autolink and <a href="http://inlines">http://inlines</a></strong></p>
-<p><img src="http://inline.com/image" alt="http://inline.com/image" /></p>
-<p><a href="mailto:a.w@b.c">a.w@b.c</a></p>
-<p>Full stop outside parens shouldn't be included <a href="http://google.com/ok">http://google.com/ok</a>.</p>
-<p>(Full stop inside parens shouldn't be included <a href="http://google.com/ok">http://google.com/ok</a>.)</p>
-<p>&quot;<a href="http://google.com">http://google.com</a>&quot;</p>
-<p>'<a href="http://google.com">http://google.com</a>'</p>
-<p><a href="http://%F0%9F%8D%84.ga/">http://🍄.ga/</a> <a href="http://x%F0%9F%8D%84.ga/">http://x🍄.ga/</a></p>
-````````````````````````````````
-
-```````````````````````````````` example
-This shouldn't crash everything: (_A_@_.A
-.
-<IGNORE>
-````````````````````````````````
-
-```````````````````````````````` example
-These should not link:
-
-* @a.b.c@. x
-* n@.  b
-.
-<p>These should not link:</p>
-<ul>
-<li>@a.b.c@. x</li>
-<li>n@.  b</li>
-</ul>
-````````````````````````````````
-
-## HTML tag filter
-
-
-```````````````````````````````` example
-This is <xmp> not okay, but **this** <strong>is</strong>.
-
-<p>This is <xmp> not okay, but **this** <strong>is</strong>.</p>
-
-Nope, I won't have <textarea>.
-
-<p>No <textarea> here either.</p>
-
-<p>This <random /> <thing> is okay</thing> though.</p>
-
-Yep, <totally>okay</totally>.
-
-<!-- HTML comments are okay, though. -->
-<!- But we're strict. ->
-<! No nonsense. >
-<!-- Leave multiline comments the heck alone, though, okay?
-Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**.
--->
-<!--- Support everything CommonMark's parser does. -->
-<!---->
-<!--thistoo-->
-.
-<p>This is &lt;xmp> not okay, but <strong>this</strong> <strong>is</strong>.</p>
-<p>This is &lt;xmp> not okay, but **this** <strong>is</strong>.</p>
-<p>Nope, I won't have &lt;textarea>.</p>
-<p>No &lt;textarea> here either.</p>
-<p>This <random /> <thing> is okay</thing> though.</p>
-<p>Yep, <totally>okay</totally>.</p>
-<!-- HTML comments are okay, though. -->
-<p>&lt;!- But we're strict. -&gt;
-&lt;! No nonsense. &gt;</p>
-<!-- Leave multiline comments the heck alone, though, okay?
-Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**.
--->
-<!--- Support everything CommonMark's parser does. -->
-<!---->
-<!--thistoo-->
-````````````````````````````````
-
-## Footnotes
-
-```````````````````````````````` example
-This is some text![^1]. Other text.[^footnote].
-
-Here's a thing[^other-note].
-
-And another thing[^codeblock-note].
-
-This doesn't have a referent[^nope].
-
-
-[^other-note]:       no code block here (spaces are stripped away)
-
-[^codeblock-note]:
-        this is now a code block (8 spaces indentation)
-
-[^1]: Some *bolded* footnote definition.
-
-Hi!
-
-[^footnote]:
-    > Blockquotes can be in a footnote.
-
-        as well as code blocks
-
-    or, naturally, simple paragraphs.
-
-[^unused]: This is unused.
-.
-<p>This is some text!<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup>. Other text.<sup class="footnote-ref"><a href="#fn-footnote" id="fnref-footnote" data-footnote-ref>2</a></sup>.</p>
-<p>Here's a thing<sup class="footnote-ref"><a href="#fn-other-note" id="fnref-other-note" data-footnote-ref>3</a></sup>.</p>
-<p>And another thing<sup class="footnote-ref"><a href="#fn-codeblock-note" id="fnref-codeblock-note" data-footnote-ref>4</a></sup>.</p>
-<p>This doesn't have a referent[^nope].</p>
-<p>Hi!</p>
-<section class="footnotes" data-footnotes>
-<ol>
-<li id="fn-1">
-<p>Some <em>bolded</em> footnote definition. <a href="#fnref-1" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p>
-</li>
-<li id="fn-footnote">
-<blockquote>
-<p>Blockquotes can be in a footnote.</p>
-</blockquote>
-<pre><code>as well as code blocks
-</code></pre>
-<p>or, naturally, simple paragraphs. <a href="#fnref-footnote" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p>
-</li>
-<li id="fn-other-note">
-<p>no code block here (spaces are stripped away) <a href="#fnref-other-note" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p>
-</li>
-<li id="fn-codeblock-note">
-<pre><code>this is now a code block (8 spaces indentation)
-</code></pre>
-<a href="#fnref-codeblock-note" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a>
-</li>
-</ol>
-</section>
-````````````````````````````````
-
-## When a footnote is used multiple times, we insert multiple backrefs.
-
-```````````````````````````````` example
-This is some text. It has a footnote[^a-footnote].
-
-This footnote is referenced[^a-footnote] multiple times, in lots of different places.[^a-footnote]
-
-[^a-footnote]: This footnote definition should have three backrefs.
-.
-<p>This is some text. It has a footnote<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote" data-footnote-ref>1</a></sup>.</p>
-<p>This footnote is referenced<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-2" data-footnote-ref>1</a></sup> multiple times, in lots of different places.<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-3" data-footnote-ref>1</a></sup></p>
-<section class="footnotes" data-footnotes>
-<ol>
-<li id="fn-a-footnote">
-<p>This footnote definition should have three backrefs. <a href="#fnref-a-footnote" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a> <a href="#fnref-a-footnote-2" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩<sup class="footnote-ref">2</sup></a> <a href="#fnref-a-footnote-3" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩<sup class="footnote-ref">3</sup></a></p>
-</li>
-</ol>
-</section>
-````````````````````````````````
-
-## Footnote reference labels are href escaped
-
-```````````````````````````````` example
-Hello[^"><script>alert(1)</script>]
-
-[^"><script>alert(1)</script>]: pwned
-.
-<p>Hello<sup class="footnote-ref"><a href="#fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" id="fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" data-footnote-ref>1</a></sup></p>
-<section class="footnotes" data-footnotes>
-<ol>
-<li id="fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E">
-<p>pwned <a href="#fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p>
-</li>
-</ol>
-</section>
-````````````````````````````````
-
-## Interop
-
-Autolink and strikethrough.
-
-```````````````````````````````` example
-~~www.google.com~~
-
-~~http://google.com~~
-.
-<p><del><a href="http://www.google.com">www.google.com</a></del></p>
-<p><del><a href="http://google.com">http://google.com</a></del></p>
-````````````````````````````````
-
-Autolink and tables.
-
-```````````````````````````````` example
-| a | b |
-| --- | --- |
-| https://github.com www.github.com | http://pokemon.com |
-.
-<table>
-<thead>
-<tr>
-<th>a</th>
-<th>b</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td><a href="https://github.com">https://github.com</a> <a href="http://www.github.com">www.github.com</a></td>
-<td><a href="http://pokemon.com">http://pokemon.com</a></td>
-</tr>
-</tbody>
-</table>
-````````````````````````````````
-
-## Task lists
-
-```````````````````````````````` example
-- [ ] foo
-- [x] bar
-.
-<ul>
-<li><input type="checkbox" disabled="" /> foo</li>
-<li><input type="checkbox" checked="" disabled="" /> bar</li>
-</ul>
-````````````````````````````````
-
-Show that a task list and a regular list get processed the same in
-the way that sublists are created. If something works in a list
-item, then it should work the same way with a task.  The only
-difference should be the tasklist marker. So, if we use something
-other than a space or x, it won't be recognized as a task item, and
-so will be treated as a regular item.
-
-```````````````````````````````` example
-- [x] foo
-  - [ ] bar
-  - [x] baz
-- [ ] bim
-
-Show a regular (non task) list to show that it has the same structure
-- [@] foo
-  - [@] bar
-  - [@] baz
-- [@] bim
-.
-<ul>
-<li><input type="checkbox" checked="" disabled="" /> foo
-<ul>
-<li><input type="checkbox" disabled="" /> bar</li>
-<li><input type="checkbox" checked="" disabled="" /> baz</li>
-</ul>
-</li>
-<li><input type="checkbox" disabled="" /> bim</li>
-</ul>
-<p>Show a regular (non task) list to show that it has the same structure</p>
-<ul>
-<li>[@] foo
-<ul>
-<li>[@] bar</li>
-<li>[@] baz</li>
-</ul>
-</li>
-<li>[@] bim</li>
-</ul>
-````````````````````````````````
-Use a larger indent -- a task list and a regular list should produce
-the same structure.
-
-```````````````````````````````` example
-- [x] foo
-    - [ ] bar
-    - [x] baz
-- [ ] bim
-
-Show a regular (non task) list to show that it has the same structure
-- [@] foo
-    - [@] bar
-    - [@] baz
-- [@] bim
-.
-<ul>
-<li><input type="checkbox" checked="" disabled="" /> foo
-<ul>
-<li><input type="checkbox" disabled="" /> bar</li>
-<li><input type="checkbox" checked="" disabled="" /> baz</li>
-</ul>
-</li>
-<li><input type="checkbox" disabled="" /> bim</li>
-</ul>
-<p>Show a regular (non task) list to show that it has the same structure</p>
-<ul>
-<li>[@] foo
-<ul>
-<li>[@] bar</li>
-<li>[@] baz</li>
-</ul>
-</li>
-<li>[@] bim</li>
-</ul>
-````````````````````````````````
-
-
\ No newline at end of file diff --git a/projects/panduck-dioxus/tests/markdown/extensions.md b/projects/panduck-dioxus/tests/markdown/extensions.md deleted file mode 100644 index 52fb29d..0000000 --- a/projects/panduck-dioxus/tests/markdown/extensions.md +++ /dev/null @@ -1,863 +0,0 @@ ---- -title: Extensions test -author: Yuki Izumi -version: 0.1 -date: '2016-08-31' -license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)' -... - -## Tables - -Here's a well-formed table, doing everything it should. - -```````````````````````````````` example -| abc | def | -| --- | --- | -| ghi | jkl | -| mno | pqr | -. - - - - - - - - - - - - - - - - - -
abcdef
ghijkl
mnopqr
-```````````````````````````````` - -We're going to mix up the table now; we'll demonstrate that inline formatting -works fine, but block elements don't. You can also have empty cells, and the -textual alignment of the columns is shown to be irrelevant. - -```````````````````````````````` example -Hello! - -| _abc_ | セン | -| ----- | ---- | -| 1. Block elements inside cells don't work. | | -| But _**inline elements do**_. | x | - -Hi! -. -

Hello!

- - - - - - - - - - - - - - - - - -
abcセン
1. Block elements inside cells don't work.
But inline elements do.x
-

Hi!

-```````````````````````````````` - -Here we demonstrate some edge cases about what is and isn't a table. - -```````````````````````````````` example -| Not enough table | to be considered table | - -| Not enough table | to be considered table | -| Not enough table | to be considered table | - -| Just enough table | to be considered table | -| ----------------- | ---------------------- | - -| ---- | --- | - -|x| -|-| - -| xyz | -| --- | -. -

| Not enough table | to be considered table |

-

| Not enough table | to be considered table | -| Not enough table | to be considered table |

- - - - - - - -
Just enough tableto be considered table
-

| ---- | --- |

- - - - - - -
x
- - - - - - -
xyz
-```````````````````````````````` - -A "simpler" table, GFM style: - -```````````````````````````````` example -abc | def ---- | --- -xyz | ghi -. - - - - - - - - - - - - - -
abcdef
xyzghi
-```````````````````````````````` - -We are making the parser slighly more lax here. Here is a table with spaces at -the end: - -```````````````````````````````` example -Hello! - -| _abc_ | セン | -| ----- | ---- | -| this row has a space at the end | | -| But _**inline elements do**_. | x | - -Hi! -. -

Hello!

- - - - - - - - - - - - - - - - - -
abcセン
this row has a space at the end
But inline elements do.x
-

Hi!

-```````````````````````````````` - -Table alignment: - -```````````````````````````````` example -aaa | bbb | ccc | ddd | eee -:-- | --- | :-: | --- | --: -fff | ggg | hhh | iii | jjj -. - - - - - - - - - - - - - - - - - - - -
aaabbbcccdddeee
fffggghhhiiijjj
-```````````````````````````````` - -### Table cell count mismatches - -The header and marker row must match. - -```````````````````````````````` example -| a | b | c | -| --- | --- | -| this | isn't | okay | -. -

| a | b | c | -| --- | --- | -| this | isn't | okay |

-```````````````````````````````` - -But any of the body rows can be shorter. Rows longer -than the header are truncated. - -```````````````````````````````` example -| a | b | c | -| --- | --- | --- -| x -| a | b -| 1 | 2 | 3 | 4 | 5 | -. - - - - - - - - - - - - - - - - - - - - - - - - - -
abc
x
ab
123
-```````````````````````````````` - -### Embedded pipes - -Tables with embedded pipes could be tricky. - -```````````````````````````````` example -| a | b | -| --- | --- | -| Escaped pipes are \|okay\|. | Like \| this. | -| Within `\|code\| is okay` too. | -| _**`c\|`**_ \| complex -| don't **\_reparse\_** -. - - - - - - - - - - - - - - - - - - - - - - - - - -
ab
Escaped pipes are |okay|.Like | this.
Within |code| is okay too.
c| | complex
don't _reparse_
-```````````````````````````````` - -### Oddly-formatted markers - -This shouldn't assert. - -```````````````````````````````` example -| a | ---- | -. - - - - - - -
a
-```````````````````````````````` - -### Escaping - -```````````````````````````````` example -| a | b | -| --- | --- | -| \\ | `\\` | -| \\\\ | `\\\\` | -| \_ | `\_` | -| \| | `\|` | -| \a | `\a` | - -\\ `\\` - -\\\\ `\\\\` - -\_ `\_` - -\| `\|` - -\a `\a` -. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ab
\\\
\\\\\\
_\_
||
\a\a
-

\ \\

-

\\ \\\\

-

_ \_

-

| \|

-

\a \a

-```````````````````````````````` - -### Embedded HTML - -```````````````````````````````` example -| a | -| --- | -| hello | -| ok
sure | -. - - - - - - - - - - - - - - -
a
hello
ok
sure
-```````````````````````````````` - -### Reference-style links - -```````````````````````````````` example -Here's a link to [Freedom Planet 2][]. - -| Here's a link to [Freedom Planet 2][] in a table header. | -| --- | -| Here's a link to [Freedom Planet 2][] in a table row. | - -[Freedom Planet 2]: http://www.freedomplanet2.com/ -. -

Here's a link to Freedom Planet 2.

- - - - - - - - - - - -
Here's a link to Freedom Planet 2 in a table header.
Here's a link to Freedom Planet 2 in a table row.
-```````````````````````````````` - -### Sequential cells - -```````````````````````````````` example -| a | b | c | -| --- | --- | --- | -| d || e | -. - - - - - - - - - - - - - - - -
abc
de
-```````````````````````````````` - -### Interaction with emphasis - -```````````````````````````````` example -| a | b | -| --- | --- | -|***(a)***| -. - - - - - - - - - - - - - -
ab
(a)
-```````````````````````````````` - -### a table can be recognised when separated from a paragraph of text without an empty line - -```````````````````````````````` example -123 -456 -| a | b | -| ---| --- | -d | e -. -

123 -456

- - - - - - - - - - - - - -
ab
de
-```````````````````````````````` - -## Strikethroughs - -A well-formed strikethrough. - -```````````````````````````````` example -A proper ~strikethrough~. -. -

A proper strikethrough.

-```````````````````````````````` - -Some strikethrough edge cases. - -```````````````````````````````` example -These are ~not strikethroughs. - -No, they are not~ - -This ~is ~ legit~ isn't ~ legit. - -This is not ~~~~~one~~~~~ huge strikethrough. - -~one~ ~~two~~ ~~~three~~~ - -No ~mismatch~~ -. -

These are ~not strikethroughs.

-

No, they are not~

-

This is ~ legit isn't ~ legit.

-

This is not ~~~~~one~~~~~ huge strikethrough.

-

one two ~~~three~~~

-

No ~mismatch~~

-```````````````````````````````` - -Using 200 tilde since it overflows the internal buffer -size (100) for parsing delimiters in inlines.c -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~striked~ - -## Autolinks - -```````````````````````````````` example -: http://google.com https://google.com - - http://google.com/å - -scyther@pokemon.com - -www.github.com www.github.com/á - -www.google.com/a_b - -**Autolink and http://inlines** - -![http://inline.com/image](http://inline.com/image) - -a.w@b.c - -Full stop outside parens shouldn't be included http://google.com/ok. - -(Full stop inside parens shouldn't be included http://google.com/ok.) - -"http://google.com" - -'http://google.com' - -http://🍄.ga/ http://x🍄.ga/ -. -

: http://google.com https://google.com

-

http://google.com/å http://google.com/å

-

scyther@pokemon.com

-

www.github.com www.github.com/á

-

www.google.com/a_b

-

Autolink and http://inlines

-

http://inline.com/image

-

a.w@b.c

-

Full stop outside parens shouldn't be included http://google.com/ok.

-

(Full stop inside parens shouldn't be included http://google.com/ok.)

-

"http://google.com"

-

'http://google.com'

-

http://🍄.ga/ http://x🍄.ga/

-```````````````````````````````` - -```````````````````````````````` example -This shouldn't crash everything: (_A_@_.A -. - -```````````````````````````````` - -```````````````````````````````` example -These should not link: - -* @a.b.c@. x -* n@. b -. -

These should not link:

-
    -
  • @a.b.c@. x
  • -
  • n@. b
  • -
-```````````````````````````````` - -## HTML tag filter - - -```````````````````````````````` example -This is not okay, but **this** <strong>is</strong>. - -<p>This is <xmp> not okay, but **this** <strong>is</strong>.</p> - -Nope, I won't have <textarea>. - -<p>No <textarea> here either.</p> - -<p>This <random /> <thing> is okay</thing> though.</p> - -Yep, <totally>okay</totally>. - -<!-- HTML comments are okay, though. --> -<!- But we're strict. -> -<! No nonsense. > -<!-- Leave multiline comments the heck alone, though, okay? -Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**. ---> -<!--- Support everything CommonMark's parser does. --> -<!----> -<!--thistoo--> -. -<p>This is &lt;xmp> not okay, but <strong>this</strong> <strong>is</strong>.</p> -<p>This is &lt;xmp> not okay, but **this** <strong>is</strong>.</p> -<p>Nope, I won't have &lt;textarea>.</p> -<p>No &lt;textarea> here either.</p> -<p>This <random /> <thing> is okay</thing> though.</p> -<p>Yep, <totally>okay</totally>.</p> -<!-- HTML comments are okay, though. --> -<p>&lt;!- But we're strict. -&gt; -&lt;! No nonsense. &gt;</p> -<!-- Leave multiline comments the heck alone, though, okay? -Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**. ---> -<!--- Support everything CommonMark's parser does. --> -<!----> -<!--thistoo--> -```````````````````````````````` - -## Footnotes - -```````````````````````````````` example -This is some text![^1]. Other text.[^footnote]. - -Here's a thing[^other-note]. - -And another thing[^codeblock-note]. - -This doesn't have a referent[^nope]. - - -[^other-note]: no code block here (spaces are stripped away) - -[^codeblock-note]: - this is now a code block (8 spaces indentation) - -[^1]: Some *bolded* footnote definition. - -Hi! - -[^footnote]: - > Blockquotes can be in a footnote. - - as well as code blocks - - or, naturally, simple paragraphs. - -[^unused]: This is unused. -. -<p>This is some text!<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup>. Other text.<sup class="footnote-ref"><a href="#fn-footnote" id="fnref-footnote" data-footnote-ref>2</a></sup>.</p> -<p>Here's a thing<sup class="footnote-ref"><a href="#fn-other-note" id="fnref-other-note" data-footnote-ref>3</a></sup>.</p> -<p>And another thing<sup class="footnote-ref"><a href="#fn-codeblock-note" id="fnref-codeblock-note" data-footnote-ref>4</a></sup>.</p> -<p>This doesn't have a referent[^nope].</p> -<p>Hi!</p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-1"> -<p>Some <em>bolded</em> footnote definition. <a href="#fnref-1" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-footnote"> -<blockquote> -<p>Blockquotes can be in a footnote.</p> -</blockquote> -<pre><code>as well as code blocks -</code></pre> -<p>or, naturally, simple paragraphs. <a href="#fnref-footnote" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-other-note"> -<p>no code block here (spaces are stripped away) <a href="#fnref-other-note" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-codeblock-note"> -<pre><code>this is now a code block (8 spaces indentation) -</code></pre> -<a href="#fnref-codeblock-note" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a> -</li> -</ol> -</section> -```````````````````````````````` - -## When a footnote is used multiple times, we insert multiple backrefs. - -```````````````````````````````` example -This is some text. It has a footnote[^a-footnote]. - -This footnote is referenced[^a-footnote] multiple times, in lots of different places.[^a-footnote] - -[^a-footnote]: This footnote definition should have three backrefs. -. -<p>This is some text. It has a footnote<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote" data-footnote-ref>1</a></sup>.</p> -<p>This footnote is referenced<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-2" data-footnote-ref>1</a></sup> multiple times, in lots of different places.<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-3" data-footnote-ref>1</a></sup></p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-a-footnote"> -<p>This footnote definition should have three backrefs. <a href="#fnref-a-footnote" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a> <a href="#fnref-a-footnote-2" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩<sup class="footnote-ref">2</sup></a> <a href="#fnref-a-footnote-3" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩<sup class="footnote-ref">3</sup></a></p> -</li> -</ol> -</section> -```````````````````````````````` - -## Footnote reference labels are href escaped - -```````````````````````````````` example -Hello[^"><script>alert(1)</script>] - -[^"><script>alert(1)</script>]: pwned -. -<p>Hello<sup class="footnote-ref"><a href="#fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" id="fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" data-footnote-ref>1</a></sup></p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E"> -<p>pwned <a href="#fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -</ol> -</section> -```````````````````````````````` - -## Interop - -Autolink and strikethrough. - -```````````````````````````````` example -~~www.google.com~~ - -~~http://google.com~~ -. -<p><del><a href="http://www.google.com">www.google.com</a></del></p> -<p><del><a href="http://google.com">http://google.com</a></del></p> -```````````````````````````````` - -Autolink and tables. - -```````````````````````````````` example -| a | b | -| --- | --- | -| https://github.com www.github.com | http://pokemon.com | -. -<table> -<thead> -<tr> -<th>a</th> -<th>b</th> -</tr> -</thead> -<tbody> -<tr> -<td><a href="https://github.com">https://github.com</a> <a href="http://www.github.com">www.github.com</a></td> -<td><a href="http://pokemon.com">http://pokemon.com</a></td> -</tr> -</tbody> -</table> -```````````````````````````````` - -## Task lists - -```````````````````````````````` example -- [ ] foo -- [x] bar -. -<ul> -<li><input type="checkbox" disabled="" /> foo</li> -<li><input type="checkbox" checked="" disabled="" /> bar</li> -</ul> -```````````````````````````````` - -Show that a task list and a regular list get processed the same in -the way that sublists are created. If something works in a list -item, then it should work the same way with a task. The only -difference should be the tasklist marker. So, if we use something -other than a space or x, it won't be recognized as a task item, and -so will be treated as a regular item. - -```````````````````````````````` example -- [x] foo - - [ ] bar - - [x] baz -- [ ] bim - -Show a regular (non task) list to show that it has the same structure -- [@] foo - - [@] bar - - [@] baz -- [@] bim -. -<ul> -<li><input type="checkbox" checked="" disabled="" /> foo -<ul> -<li><input type="checkbox" disabled="" /> bar</li> -<li><input type="checkbox" checked="" disabled="" /> baz</li> -</ul> -</li> -<li><input type="checkbox" disabled="" /> bim</li> -</ul> -<p>Show a regular (non task) list to show that it has the same structure</p> -<ul> -<li>[@] foo -<ul> -<li>[@] bar</li> -<li>[@] baz</li> -</ul> -</li> -<li>[@] bim</li> -</ul> -```````````````````````````````` -Use a larger indent -- a task list and a regular list should produce -the same structure. - -```````````````````````````````` example -- [x] foo - - [ ] bar - - [x] baz -- [ ] bim - -Show a regular (non task) list to show that it has the same structure -- [@] foo - - [@] bar - - [@] baz -- [@] bim -. -<ul> -<li><input type="checkbox" checked="" disabled="" /> foo -<ul> -<li><input type="checkbox" disabled="" /> bar</li> -<li><input type="checkbox" checked="" disabled="" /> baz</li> -</ul> -</li> -<li><input type="checkbox" disabled="" /> bim</li> -</ul> -<p>Show a regular (non task) list to show that it has the same structure</p> -<ul> -<li>[@] foo -<ul> -<li>[@] bar</li> -<li>[@] baz</li> -</ul> -</li> -<li>[@] bim</li> -</ul> -```````````````````````````````` \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/markdown/markdown-it.html b/projects/panduck-dioxus/tests/markdown/markdown-it.html deleted file mode 100644 index 0faf0f2..0000000 --- a/projects/panduck-dioxus/tests/markdown/markdown-it.html +++ /dev/null @@ -1,32 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><pre style="background-color:#ffffff;"> -<span style="color:#323232;">--- -</span><span style="color:#323232;">title: Markdown it! -</span><span style="color:#323232;">lang: en-US -</span><span style="color:#323232;">--- -</span></pre> -<p><strong>Advertisement :)</strong></p><ul><li><p><strong><a href="https://nodeca.github.io/pica/demo/"></a></strong> - high quality and fast image -resize in browser.</p></li><li><p><strong><a href="https://github.com/nodeca/babelfish/"></a></strong> - developer friendly -i18n with plurals support and easy syntax.</p></li></ul><p>You will like those projects!</p><p>===</p><h1>h1 Heading 8-)</h1><h2>h2 Heading</h2><h3>h3 Heading</h3><h4>h4 Heading</h4><h5>h5 Heading</h5><h6>h6 Heading</h6><h2>Horizontal Rules</h2><hr/><hr/><hr/><h2>Typographic replacements</h2><p>Enable typographer option to see result.</p><p>(c) (C) (r) (R) (tm) (TM) (p) (P) +––</p><p>test.. test… test….. test?….. test!….</p><p>!!!!!! ???? ,, – —</p><p>“Smartypants, double quotes” and ‘single quotes’</p><h2>Emphasis</h2><p><strong>This is bold text</strong></p><p><strong>This is bold text</strong></p><p><em>This is italic text</em></p><p><em>This is italic text</em></p><p><del>Strikethrough</del></p><h2>Blockquotes</h2><blockquote><p>Blockquotes can also be nested…</p><blockquote><p>…by using additional greater-than signs right next to each other…</p><blockquote><p>…or with spaces between arrows.</p></blockquote></blockquote></blockquote><h2>Lists</h2><p>Unordered</p><ul><li><p>Create a list by starting a line with <code><span style="color:#323232;">+</span></code>, <code><span style="color:#323232;">-</span></code>, or <code><span style="color:#323232;">*</span></code></p></li><li><p>Sub-lists are made by indenting 2 spaces:</p><ul><li><p>Marker character change forces new list start:</p><ul><li><p>Ac tristique libero volutpat at</p></li></ul><ul><li><p>Facilisis in pretium nisl aliquet</p></li></ul><ul><li><p>Nulla volutpat aliquam velit</p></li></ul></li></ul></li><li><p>Very easy!</p></li></ul><p>Ordered</p><ol><li><p>Lorem ipsum dolor sit amet</p></li><li><p>Consectetur adipiscing elit</p></li><li><p>Integer molestie lorem at massa</p></li><li><p>You can use sequential numbers…</p></li><li><p>…or keep all the numbers as <code><span style="color:#323232;">1.</span></code></p></li></ol><p>Start numbering with offset:</p><ol><li><p>foo</p></li><li><p>bar</p></li></ol><h2>Code</h2><p>Inline <code><span style="color:#323232;">code</span></code></p><p>Indented code</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">// Some comments -</span><span style="color:#323232;">line 1 of code -</span><span style="color:#323232;">line 2 of code -</span><span style="color:#323232;">line 3 of code -</span></pre> -<p>Block code “fences”</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Sample text here... -</span></pre> -<p>Syntax highlighting</p><pre style="background-color:#ffffff;"> -<span style="font-weight:bold;color:#a71d5d;">var </span><span style="font-weight:bold;color:#795da3;">foo </span><span style="font-weight:bold;color:#a71d5d;">= function </span><span style="color:#323232;">(bar) { -</span><span style="color:#323232;"> </span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#323232;">bar</span><span style="font-weight:bold;color:#a71d5d;">++</span><span style="color:#323232;">; -</span><span style="color:#323232;">}; -</span><span style="color:#323232;"> -</span><span style="color:#795da3;">console</span><span style="color:#323232;">.</span><span style="color:#0086b3;">log</span><span style="color:#323232;">(foo(</span><span style="color:#0086b3;">5</span><span style="color:#323232;">)); -</span></pre> -<h2>Tables</h2><value>Null</value><p>Right aligned columns</p><value>Null</value><h2>Links</h2><p><a href="http://dev.nodeca.com"></a></p><p><a href="http://nodeca.github.io/pica/demo/">title text!</a></p><p>Autoconverted link <a href="https://github.com/nodeca/pica"></a> (enable linkify to see)</p><h2>Images</h2><p><img src="https://octodex.github.com/images/minion.png"/> -<img src="https://octodex.github.com/images/stormtroopocat.jpg" alt="The Stormtroopocat"/></p><p>Like links, Images also have a footnote style syntax</p><p><img src="https://octodex.github.com/images/dojocat.jpg" alt="The Dojocat"/></p><p>With a reference later in the document defining the URL location:</p><h2>Plugins</h2><p>The killer feature of <code><span style="color:#323232;">markdown-it</span></code> is very effective support of -<a href="https://www.npmjs.org/browse/keyword/markdown-it-plugin"></a>.</p><h3><a href="https://github.com/markdown-it/markdown-it-emoji"></a></h3><blockquote><p>Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:</p><p>Shortcuts (emoticons): :-) :-( 8-) ;)</p></blockquote><p>see <a href="https://github.com/markdown-it/markdown-it-emoji#change-output"></a> with twemoji.</p><h3><a href="https://github.com/markdown-it/markdown-it-sub"></a> / <a href="https://github.com/markdown-it/markdown-it-sup"></a></h3><ul><li><p>19<sup>th</sup></p></li><li><p>H<del>2</del>O</p></li></ul><h3><a href="https://github.com/markdown-it/markdown-it-ins"></a></h3><p>++Inserted text++</p><h3><a href="https://github.com/markdown-it/markdown-it-mark"></a></h3><p>==Marked text==</p><h3><a href="https://github.com/markdown-it/markdown-it-footnote"></a></h3><p>Footnote 1 link[^first].</p><p>Footnote 2 link[^second].</p><p>Inline footnote^[Text of inline footnote] definition.</p><p>Duplicated footnote reference[^second].</p><h3><a href="https://github.com/markdown-it/markdown-it-deflist"></a></h3><value>Null</value><p><em>Compact style:</em></p><p>Term 1 -~ Definition 1</p><p>Term 2 -~ Definition 2a -~ Definition 2b</p><h3><a href="https://github.com/markdown-it/markdown-it-abbr"></a></h3><p>This is HTML abbreviation example.</p><p>It converts “HTML”, but keep intact partial entries like “xxxHTMLyyy” and so on.</p><p>*[HTML]: Hyper Text Markup Language</p><h3><a href="https://github.com/markdown-it/markdown-it-container"></a></h3><p>::: warning -<em>here be dragons</em> -:::</p></div></html> \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/markdown/markdown-it.md b/projects/panduck-dioxus/tests/markdown/markdown-it.md deleted file mode 100644 index 26587a7..0000000 --- a/projects/panduck-dioxus/tests/markdown/markdown-it.md +++ /dev/null @@ -1,249 +0,0 @@ ---- -title: Markdown it! -lang: en-US ---- - -__Advertisement :)__ - -- __[pica](https://nodeca.github.io/pica/demo/)__ - high quality and fast image - resize in browser. -- __[babelfish](https://github.com/nodeca/babelfish/)__ - developer friendly - i18n with plurals support and easy syntax. - -You will like those projects! - -=== - -# h1 Heading 8-) -## h2 Heading -### h3 Heading -#### h4 Heading -##### h5 Heading -###### h6 Heading - - -## Horizontal Rules - -___ - ---- - -*** - - -## Typographic replacements - -Enable typographer option to see result. - -(c) (C) (r) (R) (tm) (TM) (p) (P) +- - -test.. test... test..... test?..... test!.... - -!!!!!! ???? ,, -- --- - -"Smartypants, double quotes" and 'single quotes' - - -## Emphasis - -**This is bold text** - -__This is bold text__ - -*This is italic text* - -_This is italic text_ - -~~Strikethrough~~ - - -## Blockquotes - - -> Blockquotes can also be nested... ->> ...by using additional greater-than signs right next to each other... -> > > ...or with spaces between arrows. - - -## Lists - -Unordered - -+ Create a list by starting a line with `+`, `-`, or `*` -+ Sub-lists are made by indenting 2 spaces: - - Marker character change forces new list start: - * Ac tristique libero volutpat at - + Facilisis in pretium nisl aliquet - - Nulla volutpat aliquam velit -+ Very easy! - -Ordered - -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa - - -1. You can use sequential numbers... -1. ...or keep all the numbers as `1.` - -Start numbering with offset: - -57. foo -1. bar - - -## Code - -Inline `code` - -Indented code - - // Some comments - line 1 of code - line 2 of code - line 3 of code - - -Block code "fences" - -``` -Sample text here... -``` - -Syntax highlighting - -``` js -var foo = function (bar) { - return bar++; -}; - -console.log(foo(5)); -``` - -## Tables - -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - -Right aligned columns - -| Option | Description | -| ------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - - -## Links - -[link text](http://dev.nodeca.com) - -[link with title](http://nodeca.github.io/pica/demo/ "title text!") - -Autoconverted link https://github.com/nodeca/pica (enable linkify to see) - - -## Images - -![Minion](https://octodex.github.com/images/minion.png) -![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") - -Like links, Images also have a footnote style syntax - -![Alt text][id] - -With a reference later in the document defining the URL location: - -[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" - - -## Plugins - -The killer feature of `markdown-it` is very effective support of -[syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin). - - -### [Emojies](https://github.com/markdown-it/markdown-it-emoji) - -> Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum: -> -> Shortcuts (emoticons): :-) :-( 8-) ;) - -see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji. - - -### [Subscript](https://github.com/markdown-it/markdown-it-sub) / [Superscript](https://github.com/markdown-it/markdown-it-sup) - -- 19^th^ -- H~2~O - - -### [\<ins>](https://github.com/markdown-it/markdown-it-ins) - -++Inserted text++ - - -### [\<mark>](https://github.com/markdown-it/markdown-it-mark) - -==Marked text== - - -### [Footnotes](https://github.com/markdown-it/markdown-it-footnote) - -Footnote 1 link[^first]. - -Footnote 2 link[^second]. - -Inline footnote^[Text of inline footnote] definition. - -Duplicated footnote reference[^second]. - -[^first]: Footnote **can have markup** - - and multiple paragraphs. - -[^second]: Footnote text. - - -### [Definition lists](https://github.com/markdown-it/markdown-it-deflist) - -Term 1 - -: Definition 1 -with lazy continuation. - -Term 2 with *inline markup* - -: Definition 2 - - { some code, part of Definition 2 } - - Third paragraph of definition 2. - -_Compact style:_ - -Term 1 - ~ Definition 1 - -Term 2 - ~ Definition 2a - ~ Definition 2b - - -### [Abbreviations](https://github.com/markdown-it/markdown-it-abbr) - -This is HTML abbreviation example. - -It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. - -*[HTML]: Hyper Text Markup Language - -### [Custom containers](https://github.com/markdown-it/markdown-it-container) - -::: warning -*here be dragons* -::: diff --git a/projects/panduck-dioxus/tests/markdown/mod.rs b/projects/panduck-dioxus/tests/markdown/mod.rs deleted file mode 100644 index c2ce823..0000000 --- a/projects/panduck-dioxus/tests/markdown/mod.rs +++ /dev/null @@ -1,35 +0,0 @@ -use super::*; - -pub fn html_standalone(source: &str, target: &str) -> Result<()> { - html_standalone_builder(panduck_core::convert::parse_common_markdown)(source, target) -} - -#[test] -pub fn basic() -> Result<()> { - html_standalone(include_str!("basic.md"), include_str!("basic.html"))?; - Ok(()) -} - -#[test] -pub fn extensions() -> Result<()> { - html_standalone(include_str!("extensions.md"), include_str!("extensions.html"))?; - Ok(()) -} - -#[test] -pub fn regression() -> Result<()> { - html_standalone(include_str!("regression.md"), include_str!("regression.html"))?; - Ok(()) -} - -#[test] -pub fn markdown_it() -> Result<()> { - html_standalone(include_str!("markdown-it.md"), include_str!("markdown-it.html"))?; - Ok(()) -} - -#[test] -pub fn punctuation() -> Result<()> { - html_standalone(include_str!("punctuation.md"), include_str!("punctuation.html"))?; - Ok(()) -} diff --git a/projects/panduck-dioxus/tests/markdown/punctuation.html b/projects/panduck-dioxus/tests/markdown/punctuation.html deleted file mode 100644 index 3a91722..0000000 --- a/projects/panduck-dioxus/tests/markdown/punctuation.html +++ /dev/null @@ -1,137 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><h2>Smart punctuation</h2><p>Open quotes are matched with closed quotes. -The same method is used for matching openers and closers -as is used in emphasis parsing:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&quot;Hello,&quot; said the spider. -</span><span style="color:#323232;">&quot;&#39;Shelob&#39; is my name.&quot; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;“Hello,” said the spider. -</span><span style="color:#323232;">“‘Shelob’ is my name.”&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;A&#39;, &#39;B&#39;, and &#39;C&#39; are letters. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;‘A’, ‘B’, and ‘C’ are letters.&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;Oak,&#39; &#39;elm,&#39; and &#39;beech&#39; are names of trees. -</span><span style="color:#323232;">So is &#39;pine.&#39; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. -</span><span style="color:#323232;">So is ‘pine.’&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;He said, &quot;I want to go.&quot;&#39; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;‘He said, “I want to go.”’&lt;/p&gt; -</span></pre> -<p>A single quote that isn’t an open quote matched -with a close quote will be treated as an -apostrophe:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Were you alive in the 70&#39;s? -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Were you alive in the 70’s?&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">Here is some quoted &#39;`code`&#39; and a &quot;[quoted link](url)&quot;. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Here is some quoted ‘&lt;code&gt;code&lt;/code&gt;’ and a “&lt;a href=&quot;url&quot;&gt;quoted link&lt;/a&gt;”.&lt;/p&gt; -</span></pre> -<p>Here the first <code><span style="color:#323232;">&#39;</span></code> is treated as an apostrophe, not -an open quote, because the final single quote is matched -by the single quote before <code><span style="color:#323232;">jolly</span></code>:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;tis the season to be &#39;jolly&#39; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;’tis the season to be ‘jolly’&lt;/p&gt; -</span></pre> -<p>Multiple apostrophes should not be marked as open/closing quotes.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;We&#39;ll use Jane&#39;s boat and John&#39;s truck,&#39; Jenna said. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;‘We’ll use Jane’s boat and John’s truck,’ Jenna said.&lt;/p&gt; -</span></pre> -<p>An unmatched double quote will be interpreted as a -left double quote, to facilitate this style:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&quot;A paragraph with no closing quote. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&quot;Second paragraph by same speaker, in fiction.&quot; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;“A paragraph with no closing quote.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;“Second paragraph by same speaker, in fiction.”&lt;/p&gt; -</span></pre> -<p>A quote following a <code><span style="color:#323232;">]</span></code> or <code><span style="color:#323232;">)</span></code> character cannot -be an open quote:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a]&#39;s b&#39; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a]’s b’&lt;/p&gt; -</span></pre> -<p>Quotes that are escaped come out as literal straight -quotes:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">\&quot;This is not smart.\&quot; -</span><span style="color:#323232;">This isn\&#39;t either. -</span><span style="color:#323232;">5\&#39;8\&quot; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;&amp;quot;This is not smart.&amp;quot; -</span><span style="color:#323232;">This isn&#39;t either. -</span><span style="color:#323232;">5&#39;8&amp;quot;&lt;/p&gt; -</span></pre> -<p>Two hyphens form an en-dash, three an em-dash.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Some dashes: em---em -</span><span style="color:#323232;">en--en -</span><span style="color:#323232;">em --- em -</span><span style="color:#323232;">en -- en -</span><span style="color:#323232;">2--3 -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Some dashes: em—em -</span><span style="color:#323232;">en–en -</span><span style="color:#323232;">em — em -</span><span style="color:#323232;">en – en -</span><span style="color:#323232;">2–3&lt;/p&gt; -</span></pre> -<p>A sequence of more than three hyphens is -parsed as a sequence of em and/or en dashes, -with no hyphens. If possible, a homogeneous -sequence of dashes is used (so, 10 hyphens -= 5 en dashes, and 9 hyphens = 3 em dashes). -When a heterogeneous sequence must be used, -the em dashes come first, followed by the en -dashes, and as few en dashes as possible are -used (so, 7 hyphens = 2 em dashes an 1 en -dash).</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">one- -</span><span style="color:#323232;">two-- -</span><span style="color:#323232;">three--- -</span><span style="color:#323232;">four---- -</span><span style="color:#323232;">five----- -</span><span style="color:#323232;">six------ -</span><span style="color:#323232;">seven------- -</span><span style="color:#323232;">eight-------- -</span><span style="color:#323232;">nine--------- -</span><span style="color:#323232;">thirteen-------------. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;one- -</span><span style="color:#323232;">two– -</span><span style="color:#323232;">three— -</span><span style="color:#323232;">four–– -</span><span style="color:#323232;">five—– -</span><span style="color:#323232;">six—— -</span><span style="color:#323232;">seven—–– -</span><span style="color:#323232;">eight–––– -</span><span style="color:#323232;">nine——— -</span><span style="color:#323232;">thirteen———––.&lt;/p&gt; -</span></pre> -<p>Hyphens can be escaped:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Escaped hyphens: \-- \-\-\-. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Escaped hyphens: -- ---.&lt;/p&gt; -</span></pre> -<p>Three periods form an ellipsis:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Ellipses...and...and.... -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Ellipses…and…and….&lt;/p&gt; -</span></pre> -<p>Periods can be escaped if ellipsis-formation -is not wanted:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">No ellipses\.\.\. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;No ellipses...&lt;/p&gt; -</span></pre> -</div></html> \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/markdown/punctuation.md b/projects/panduck-dioxus/tests/markdown/punctuation.md deleted file mode 100644 index 73bd687..0000000 --- a/projects/panduck-dioxus/tests/markdown/punctuation.md +++ /dev/null @@ -1,177 +0,0 @@ -## Smart punctuation - -Open quotes are matched with closed quotes. -The same method is used for matching openers and closers -as is used in emphasis parsing: - -```````````````````````````````` example -"Hello," said the spider. -"'Shelob' is my name." -. -<p>“Hello,” said the spider. -“‘Shelob’ is my name.”</p> -```````````````````````````````` - -```````````````````````````````` example -'A', 'B', and 'C' are letters. -. -<p>‘A’, ‘B’, and ‘C’ are letters.</p> -```````````````````````````````` - -```````````````````````````````` example -'Oak,' 'elm,' and 'beech' are names of trees. -So is 'pine.' -. -<p>‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. -So is ‘pine.’</p> -```````````````````````````````` - -```````````````````````````````` example -'He said, "I want to go."' -. -<p>‘He said, “I want to go.”’</p> -```````````````````````````````` - -A single quote that isn't an open quote matched -with a close quote will be treated as an -apostrophe: - -```````````````````````````````` example -Were you alive in the 70's? -. -<p>Were you alive in the 70’s?</p> -```````````````````````````````` - -```````````````````````````````` example -Here is some quoted '`code`' and a "[quoted link](url)". -. -<p>Here is some quoted ‘<code>code</code>’ and a “<a href="url">quoted link</a>”.</p> -```````````````````````````````` - -Here the first `'` is treated as an apostrophe, not -an open quote, because the final single quote is matched -by the single quote before `jolly`: - -```````````````````````````````` example -'tis the season to be 'jolly' -. -<p>’tis the season to be ‘jolly’</p> -```````````````````````````````` - -Multiple apostrophes should not be marked as open/closing quotes. - -```````````````````````````````` example -'We'll use Jane's boat and John's truck,' Jenna said. -. -<p>‘We’ll use Jane’s boat and John’s truck,’ Jenna said.</p> -```````````````````````````````` - -An unmatched double quote will be interpreted as a -left double quote, to facilitate this style: - -```````````````````````````````` example -"A paragraph with no closing quote. - -"Second paragraph by same speaker, in fiction." -. -<p>“A paragraph with no closing quote.</p> -<p>“Second paragraph by same speaker, in fiction.”</p> -```````````````````````````````` - -A quote following a `]` or `)` character cannot -be an open quote: - -```````````````````````````````` example -[a]'s b' -. -<p>[a]’s b’</p> -```````````````````````````````` - -Quotes that are escaped come out as literal straight -quotes: - -```````````````````````````````` example -\"This is not smart.\" -This isn\'t either. -5\'8\" -. -<p>&quot;This is not smart.&quot; -This isn't either. -5'8&quot;</p> -```````````````````````````````` - -Two hyphens form an en-dash, three an em-dash. - -```````````````````````````````` example -Some dashes: em---em -en--en -em --- em -en -- en -2--3 -. -<p>Some dashes: em—em -en–en -em — em -en – en -2–3</p> -```````````````````````````````` - -A sequence of more than three hyphens is -parsed as a sequence of em and/or en dashes, -with no hyphens. If possible, a homogeneous -sequence of dashes is used (so, 10 hyphens -= 5 en dashes, and 9 hyphens = 3 em dashes). -When a heterogeneous sequence must be used, -the em dashes come first, followed by the en -dashes, and as few en dashes as possible are -used (so, 7 hyphens = 2 em dashes an 1 en -dash). - -```````````````````````````````` example -one- -two-- -three--- -four---- -five----- -six------ -seven------- -eight-------- -nine--------- -thirteen-------------. -. -<p>one- -two– -three— -four–– -five—– -six—— -seven—–– -eight–––– -nine——— -thirteen———––.</p> -```````````````````````````````` - -Hyphens can be escaped: - -```````````````````````````````` example -Escaped hyphens: \-- \-\-\-. -. -<p>Escaped hyphens: -- ---.</p> -```````````````````````````````` - -Three periods form an ellipsis: - -```````````````````````````````` example -Ellipses...and...and.... -. -<p>Ellipses…and…and….</p> -```````````````````````````````` - -Periods can be escaped if ellipsis-formation -is not wanted: - -```````````````````````````````` example -No ellipses\.\.\. -. -<p>No ellipses...</p> -```````````````````````````````` \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/markdown/regression.html b/projects/panduck-dioxus/tests/markdown/regression.html deleted file mode 100644 index 7e217f5..0000000 --- a/projects/panduck-dioxus/tests/markdown/regression.html +++ /dev/null @@ -1,292 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><h3>Regression tests</h3><p>Issue #113: EOL character weirdness on Windows -(Important: first line ends with CR + CR + LF)</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">line1 -</span><span style="color:#323232;"> -</span><span style="color:#323232;">line2 -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;line1&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;line2&lt;/p&gt; -</span></pre> -<p>Issue #114: cmark skipping first character in line -(Important: the blank lines around “Repeatedly” contain a tab.)</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">By taking it apart -</span><span style="color:#323232;"> -</span><span style="color:#323232;">- alternative solutions -</span><span style="color:#323232;">→ -</span><span style="color:#323232;">Repeatedly solving -</span><span style="color:#323232;">→ -</span><span style="color:#323232;">- how techniques -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;By taking it apart&lt;/p&gt; -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;alternative solutions&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">&lt;p&gt;Repeatedly solving&lt;/p&gt; -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;how techniques&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span></pre> -<p>Issue jgm/CommonMark#430: h2..h6 not recognized as block tags.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&lt;h1&gt;lorem&lt;/h1&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h2&gt;lorem&lt;/h2&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h3&gt;lorem&lt;/h3&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h4&gt;lorem&lt;/h4&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h5&gt;lorem&lt;/h5&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h6&gt;lorem&lt;/h6&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;h1&gt;lorem&lt;/h1&gt; -</span><span style="color:#323232;">&lt;h2&gt;lorem&lt;/h2&gt; -</span><span style="color:#323232;">&lt;h3&gt;lorem&lt;/h3&gt; -</span><span style="color:#323232;">&lt;h4&gt;lorem&lt;/h4&gt; -</span><span style="color:#323232;">&lt;h5&gt;lorem&lt;/h5&gt; -</span><span style="color:#323232;">&lt;h6&gt;lorem&lt;/h6&gt; -</span></pre> -<p>Issue jgm/commonmark.js#109 - tabs after setext header line</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">hi -</span><span style="color:#323232;">--→ -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;h2&gt;hi&lt;/h2&gt; -</span></pre> -<p>Issue #177 - incorrect emphasis parsing</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">a***b* c* -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;a*&lt;em&gt;&lt;em&gt;b&lt;/em&gt; c&lt;/em&gt;&lt;/p&gt; -</span></pre> -<p>Issue #193 - unescaped left angle brackets in link destination</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[a]: &lt;te&lt;st&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a]&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;[a]: &amp;lt;te&lt;st&gt;&lt;/p&gt; -</span></pre> -<p>Issue #192 - escaped spaces in link destination</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a](te\ st) -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a](te\ st)&lt;/p&gt; -</span></pre> -<p>Issue github/github#76615: multiple delimiter combinations gets sketchy</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">~~**_`this`_**~~ -</span><span style="color:#323232;">~~***`this`***~~ -</span><span style="color:#323232;">~~___`this`___~~ -</span><span style="color:#323232;"> -</span><span style="color:#323232;">**_`this`_** -</span><span style="color:#323232;">***`this`*** -</span><span style="color:#323232;">___`this`___ -</span><span style="color:#323232;"> -</span><span style="color:#323232;">~~**_this_**~~ -</span><span style="color:#323232;">~~***this***~~ -</span><span style="color:#323232;">~~___this___~~ -</span><span style="color:#323232;"> -</span><span style="color:#323232;">**_this_** -</span><span style="color:#323232;">***this*** -</span><span style="color:#323232;">___this___ -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;&lt;del&gt;&lt;strong&gt;&lt;em&gt;&lt;code&gt;this&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/del&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;del&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;this&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;del&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;this&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;code&gt;this&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;em&gt;&lt;strong&gt;&lt;code&gt;this&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;em&gt;&lt;strong&gt;&lt;code&gt;this&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;del&gt;&lt;strong&gt;&lt;em&gt;this&lt;/em&gt;&lt;/strong&gt;&lt;/del&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;del&gt;&lt;em&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;del&gt;&lt;em&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;strong&gt;&lt;em&gt;this&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;em&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;em&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; -</span></pre> -<p>Issue #527 - meta tags in inline contexts</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">City: -</span><span style="color:#323232;">&lt;span itemprop=&quot;contentLocation&quot; itemscope itemtype=&quot;https://schema.org/City&quot;&gt; -</span><span style="color:#323232;"> &lt;meta itemprop=&quot;name&quot; content=&quot;Springfield&quot;&gt; -</span><span style="color:#323232;">&lt;/span&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;City: -</span><span style="color:#323232;">&lt;span itemprop=&quot;contentLocation&quot; itemscope itemtype=&quot;https://schema.org/City&quot;&gt; -</span><span style="color:#323232;">&lt;meta itemprop=&quot;name&quot; content=&quot;Springfield&quot;&gt; -</span><span style="color:#323232;">&lt;/span&gt;&lt;/p&gt; -</span></pre> -<p>cmark-gfm strikethrough rules</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">~Hi~ Hello, world! -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;&lt;del&gt;Hi&lt;/del&gt; Hello, world!&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">This ~text~ ~~is~~ ~~~curious~~~. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This &lt;del&gt;text&lt;/del&gt; &lt;del&gt;is&lt;/del&gt; ~~~curious~~~.&lt;/p&gt; -</span></pre> -<p><code><span style="color:#323232;">~</span></code> should not be escaped in href — <a href="https://github.com/github/markup/issues/311"></a></p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[x](http://members.aon.at/~nkehrer/ibm_5110/emu5110.html) -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;&lt;a href=&quot;http://members.aon.at/~nkehrer/ibm_5110/emu5110.html&quot;&gt;x&lt;/a&gt;&lt;/p&gt; -</span></pre> -<p>Footnotes in tables</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">A footnote in a paragraph[^1] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">| Column1 | Column2 | -</span><span style="color:#323232;">| --------- | ------- | -</span><span style="color:#323232;">| foot [^1] | note | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^1]: a footnote -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;A footnote in a paragraph&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-1&quot; id=&quot;fnref-1&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;Column1&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;Column2&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;foot &lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-1&quot; id=&quot;fnref-1-2&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;note&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-1&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;a footnote &lt;a href=&quot;#fnref-1&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt; &lt;a href=&quot;#fnref-1-2&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;sup class=&quot;footnote-ref&quot;&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span></pre> -<p>Issue #527 - meta tags in inline contexts</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">City: -</span><span style="color:#323232;">&lt;span itemprop=&quot;contentLocation&quot; itemscope itemtype=&quot;https://schema.org/City&quot;&gt; -</span><span style="color:#323232;"> &lt;meta itemprop=&quot;name&quot; content=&quot;Springfield&quot;&gt; -</span><span style="color:#323232;">&lt;/span&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;City: -</span><span style="color:#323232;">&lt;span itemprop=&quot;contentLocation&quot; itemscope itemtype=&quot;https://schema.org/City&quot;&gt; -</span><span style="color:#323232;">&lt;meta itemprop=&quot;name&quot; content=&quot;Springfield&quot;&gt; -</span><span style="color:#323232;">&lt;/span&gt;&lt;/p&gt; -</span></pre> -<p>Issue #530 - link parsing corner cases</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a](\ b) -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[a](&lt;&lt;b) -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[a](&lt;b -</span><span style="color:#323232;">) -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a](\ b)&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;[a](&amp;lt;&amp;lt;b)&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;[a](&amp;lt;b -</span><span style="color:#323232;">)&lt;/p&gt; -</span></pre> -<p>Issue commonmark#526 - unescaped ( in link title</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[link](url ((title)) -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[link](url ((title))&lt;/p&gt; -</span></pre> -<p>Issue commonamrk#517 - script, pre, style close tag without -opener.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&lt;/script&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;/pre&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;/style&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;/script&gt; -</span><span style="color:#323232;">&lt;/pre&gt; -</span><span style="color:#323232;">&lt;/style&gt; -</span></pre> -<p>Issue #289.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a](&lt;b) c&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a](&amp;lt;b) c&amp;gt;&lt;/p&gt; -</span></pre> -<p>Pull request #128 - Buffer overread in tables extension</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| -</span><span style="color:#323232;">-| -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;| -</span><span style="color:#323232;">-|&lt;/p&gt; -</span></pre> -<p>Footnotes may be nested inside other footnotes.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">This is some text. It has a citation.[^citation] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^another-citation]: My second citation. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^citation]: This is a long winded parapgraph that also has another citation.[^another-citation] -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This is some text. It has a citation.&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-citation&quot; id=&quot;fnref-citation&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-citation&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;This is a long winded parapgraph that also has another citation.&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-another-citation&quot; id=&quot;fnref-another-citation&quot; data-footnote-ref&gt;2&lt;/a&gt;&lt;/sup&gt; &lt;a href=&quot;#fnref-citation&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-another-citation&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;My second citation. &lt;a href=&quot;#fnref-another-citation&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span></pre> -<p>Footnotes are similar to, but should not be confused with, link references</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">This is some text. It has two footnotes references, side-by-side without any spaces,[^footnote1][^footnote2] which are definitely not link references. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^footnote1]: Hello. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^footnote2]: Goodbye. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This is some text. It has two footnotes references, side-by-side without any spaces,&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-footnote1&quot; id=&quot;fnref-footnote1&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-footnote2&quot; id=&quot;fnref-footnote2&quot; data-footnote-ref&gt;2&lt;/a&gt;&lt;/sup&gt; which are definitely not link references.&lt;/p&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-footnote1&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;Hello. &lt;a href=&quot;#fnref-footnote1&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-footnote2&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;Goodbye. &lt;a href=&quot;#fnref-footnote2&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span></pre> -<p>Footnotes may begin with or have a ‘w’ or a ‘_’ in their reference label.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">This is some text. Sometimes the autolinker splits up text into multiple nodes, hoping it will find a hyperlink, so this text has a footnote whose reference label begins with a `w`.[^widely-cited] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">It has another footnote that contains many different characters (the autolinker was also breaking on `_`).[^sphinx-of-black-quartz_judge-my-vow-0123456789] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^sphinx-of-black-quartz_judge-my-vow-0123456789]: so does this. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^widely-cited]: this renders properly. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This is some text. Sometimes the autolinker splits up text into multiple nodes, hoping it will find a hyperlink, so this text has a footnote whose reference label begins with a &lt;code&gt;w&lt;/code&gt;.&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-widely-cited&quot; id=&quot;fnref-widely-cited&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;It has another footnote that contains many different characters (the autolinker was also breaking on &lt;code&gt;_&lt;/code&gt;).&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-sphinx-of-black-quartz_judge-my-vow-0123456789&quot; id=&quot;fnref-sphinx-of-black-quartz_judge-my-vow-0123456789&quot; data-footnote-ref&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-widely-cited&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;this renders properly. &lt;a href=&quot;#fnref-widely-cited&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-sphinx-of-black-quartz_judge-my-vow-0123456789&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;so does this. &lt;a href=&quot;#fnref-sphinx-of-black-quartz_judge-my-vow-0123456789&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span></pre> -<p>Footnotes interacting with strikethrough should not lead to a use-after-free</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">|Tot.....[^_a_]| -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;|Tot.....[^_a_]|&lt;/p&gt; -</span></pre> -<p>Footnotes interacting with strikethrough should not lead to a use-after-free pt2</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[^~~is~~1] -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[^~~is~~1]&lt;/p&gt; -</span></pre> -<p>Adjacent unused footnotes definitions should not lead to a use after free</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Hello world -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^a]:[^b]: -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Hello world&lt;/p&gt; -</span></pre> -</div></html> \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/markdown/regression.md b/projects/panduck-dioxus/tests/markdown/regression.md deleted file mode 100644 index 9178a15..0000000 --- a/projects/panduck-dioxus/tests/markdown/regression.md +++ /dev/null @@ -1,368 +0,0 @@ -### Regression tests - -Issue #113: EOL character weirdness on Windows -(Important: first line ends with CR + CR + LF) - -```````````````````````````````` example -line1 - -line2 -. -<p>line1</p> -<p>line2</p> -```````````````````````````````` - -Issue #114: cmark skipping first character in line -(Important: the blank lines around "Repeatedly" contain a tab.) - -```````````````````````````````` example -By taking it apart - -- alternative solutions -→ -Repeatedly solving -→ -- how techniques -. -<p>By taking it apart</p> -<ul> -<li>alternative solutions</li> -</ul> -<p>Repeatedly solving</p> -<ul> -<li>how techniques</li> -</ul> -```````````````````````````````` - -Issue jgm/CommonMark#430: h2..h6 not recognized as block tags. - -```````````````````````````````` example -<h1>lorem</h1> - -<h2>lorem</h2> - -<h3>lorem</h3> - -<h4>lorem</h4> - -<h5>lorem</h5> - -<h6>lorem</h6> -. -<h1>lorem</h1> -<h2>lorem</h2> -<h3>lorem</h3> -<h4>lorem</h4> -<h5>lorem</h5> -<h6>lorem</h6> -```````````````````````````````` - -Issue jgm/commonmark.js#109 - tabs after setext header line - - -```````````````````````````````` example -hi ---→ -. -<h2>hi</h2> -```````````````````````````````` - -Issue #177 - incorrect emphasis parsing - -```````````````````````````````` example -a***b* c* -. -<p>a*<em><em>b</em> c</em></p> -```````````````````````````````` - -Issue #193 - unescaped left angle brackets in link destination - -```````````````````````````````` example -[a] - -[a]: <te<st> -. -<p>[a]</p> -<p>[a]: &lt;te<st></p> -```````````````````````````````` - -Issue #192 - escaped spaces in link destination - - -```````````````````````````````` example -[a](te\ st) -. -<p>[a](te\ st)</p> -```````````````````````````````` - -Issue github/github#76615: multiple delimiter combinations gets sketchy - - -```````````````````````````````` example strikethrough -~~**_`this`_**~~ -~~***`this`***~~ -~~___`this`___~~ - -**_`this`_** -***`this`*** -___`this`___ - -~~**_this_**~~ -~~***this***~~ -~~___this___~~ - -**_this_** -***this*** -___this___ -. -<p><del><strong><em><code>this</code></em></strong></del><br /> -<del><em><strong><code>this</code></strong></em></del><br /> -<del><em><strong><code>this</code></strong></em></del></p> -<p><strong><em><code>this</code></em></strong><br /> -<em><strong><code>this</code></strong></em><br /> -<em><strong><code>this</code></strong></em></p> -<p><del><strong><em>this</em></strong></del><br /> -<del><em><strong>this</strong></em></del><br /> -<del><em><strong>this</strong></em></del></p> -<p><strong><em>this</em></strong><br /> -<em><strong>this</strong></em><br /> -<em><strong>this</strong></em></p> -```````````````````````````````` - -Issue #527 - meta tags in inline contexts - -```````````````````````````````` example -City: -<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City"> - <meta itemprop="name" content="Springfield"> -</span> -. -<p>City: -<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City"> -<meta itemprop="name" content="Springfield"> -</span></p> -```````````````````````````````` - -cmark-gfm strikethrough rules - -```````````````````````````````` example strikethrough -~Hi~ Hello, world! -. -<p><del>Hi</del> Hello, world!</p> -```````````````````````````````` - -```````````````````````````````` example strikethrough -This ~text~ ~~is~~ ~~~curious~~~. -. -<p>This <del>text</del> <del>is</del> ~~~curious~~~.</p> -```````````````````````````````` - -`~` should not be escaped in href — https://github.com/github/markup/issues/311 - -```````````````````````````````` example -[x](http://members.aon.at/~nkehrer/ibm_5110/emu5110.html) -. -<p><a href="http://members.aon.at/~nkehrer/ibm_5110/emu5110.html">x</a></p> -```````````````````````````````` - -Footnotes in tables - -```````````````````````````````` example table footnotes -A footnote in a paragraph[^1] - -| Column1 | Column2 | -| --------- | ------- | -| foot [^1] | note | - -[^1]: a footnote -. -<p>A footnote in a paragraph<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup></p> -<table> -<thead> -<tr> -<th>Column1</th> -<th>Column2</th> -</tr> -</thead> -<tbody> -<tr> -<td>foot <sup class="footnote-ref"><a href="#fn-1" id="fnref-1-2" data-footnote-ref>1</a></sup></td> -<td>note</td> -</tr> -</tbody> -</table> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-1"> -<p>a footnote <a href="#fnref-1" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a> <a href="#fnref-1-2" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩<sup class="footnote-ref">2</sup></a></p> -</li> -</ol> -</section> -```````````````````````````````` - -Issue #527 - meta tags in inline contexts - -```````````````````````````````` example -City: -<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City"> - <meta itemprop="name" content="Springfield"> -</span> -. -<p>City: -<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City"> -<meta itemprop="name" content="Springfield"> -</span></p> -```````````````````````````````` - -Issue #530 - link parsing corner cases - -```````````````````````````````` example -[a](\ b) - -[a](<<b) - -[a](<b -) -. -<p>[a](\ b)</p> -<p>[a](&lt;&lt;b)</p> -<p>[a](&lt;b -)</p> -```````````````````````````````` - -Issue commonmark#526 - unescaped ( in link title - -```````````````````````````````` example -[link](url ((title)) -. -<p>[link](url ((title))</p> -```````````````````````````````` - -Issue commonamrk#517 - script, pre, style close tag without -opener. - -```````````````````````````````` example -</script> - -</pre> - -</style> -. -</script> -</pre> -</style> -```````````````````````````````` - -Issue #289. - -```````````````````````````````` example -[a](<b) c> -. -<p>[a](&lt;b) c&gt;</p> -```````````````````````````````` - -Pull request #128 - Buffer overread in tables extension - -```````````````````````````````` example table -| --| -. -<p>| --|</p> -```````````````````````````````` - -Footnotes may be nested inside other footnotes. - -```````````````````````````````` example footnotes -This is some text. It has a citation.[^citation] - -[^another-citation]: My second citation. - -[^citation]: This is a long winded parapgraph that also has another citation.[^another-citation] -. -<p>This is some text. It has a citation.<sup class="footnote-ref"><a href="#fn-citation" id="fnref-citation" data-footnote-ref>1</a></sup></p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-citation"> -<p>This is a long winded parapgraph that also has another citation.<sup class="footnote-ref"><a href="#fn-another-citation" id="fnref-another-citation" data-footnote-ref>2</a></sup> <a href="#fnref-citation" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-another-citation"> -<p>My second citation. <a href="#fnref-another-citation" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -</ol> -</section> -```````````````````````````````` - -Footnotes are similar to, but should not be confused with, link references - -```````````````````````````````` example footnotes -This is some text. It has two footnotes references, side-by-side without any spaces,[^footnote1][^footnote2] which are definitely not link references. - -[^footnote1]: Hello. - -[^footnote2]: Goodbye. -. -<p>This is some text. It has two footnotes references, side-by-side without any spaces,<sup class="footnote-ref"><a href="#fn-footnote1" id="fnref-footnote1" data-footnote-ref>1</a></sup><sup class="footnote-ref"><a href="#fn-footnote2" id="fnref-footnote2" data-footnote-ref>2</a></sup> which are definitely not link references.</p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-footnote1"> -<p>Hello. <a href="#fnref-footnote1" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-footnote2"> -<p>Goodbye. <a href="#fnref-footnote2" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -</ol> -</section> -```````````````````````````````` - -Footnotes may begin with or have a 'w' or a '_' in their reference label. - -```````````````````````````````` example footnotes autolink -This is some text. Sometimes the autolinker splits up text into multiple nodes, hoping it will find a hyperlink, so this text has a footnote whose reference label begins with a `w`.[^widely-cited] - -It has another footnote that contains many different characters (the autolinker was also breaking on `_`).[^sphinx-of-black-quartz_judge-my-vow-0123456789] - -[^sphinx-of-black-quartz_judge-my-vow-0123456789]: so does this. - -[^widely-cited]: this renders properly. -. -<p>This is some text. Sometimes the autolinker splits up text into multiple nodes, hoping it will find a hyperlink, so this text has a footnote whose reference label begins with a <code>w</code>.<sup class="footnote-ref"><a href="#fn-widely-cited" id="fnref-widely-cited" data-footnote-ref>1</a></sup></p> -<p>It has another footnote that contains many different characters (the autolinker was also breaking on <code>_</code>).<sup class="footnote-ref"><a href="#fn-sphinx-of-black-quartz_judge-my-vow-0123456789" id="fnref-sphinx-of-black-quartz_judge-my-vow-0123456789" data-footnote-ref>2</a></sup></p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-widely-cited"> -<p>this renders properly. <a href="#fnref-widely-cited" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-sphinx-of-black-quartz_judge-my-vow-0123456789"> -<p>so does this. <a href="#fnref-sphinx-of-black-quartz_judge-my-vow-0123456789" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -</ol> -</section> -```````````````````````````````` - -Footnotes interacting with strikethrough should not lead to a use-after-free - -```````````````````````````````` example footnotes autolink strikethrough table -|Tot.....[^_a_]| -. -<p>|Tot.....[^_a_]|</p> -```````````````````````````````` - -Footnotes interacting with strikethrough should not lead to a use-after-free pt2 - -```````````````````````````````` example footnotes autolink strikethrough table -[^~~is~~1] -. -<p>[^~~is~~1]</p> -```````````````````````````````` - -Adjacent unused footnotes definitions should not lead to a use after free - -```````````````````````````````` example footnotes autolink strikethrough table -Hello world - - -[^a]:[^b]: -. -<p>Hello world</p> -```````````````````````````````` \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/rst/Readme.md b/projects/panduck-dioxus/tests/rst/Readme.md deleted file mode 100644 index 3a4e68b..0000000 --- a/projects/panduck-dioxus/tests/rst/Readme.md +++ /dev/null @@ -1 +0,0 @@ -https://3vshej.cn/rstSyntax/ \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/rst/example.html b/projects/panduck-dioxus/tests/rst/example.html deleted file mode 100644 index 8c2fa5c..0000000 --- a/projects/panduck-dioxus/tests/rst/example.html +++ /dev/null @@ -1,176 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><value>Null</value><p><h1>Example .rst File</h1><p>If you work with edX documentation source files, you might find this file helpful as a reference. This file contains examples of .rst formatting.</p><p>Explanations and more context for each type of element are provided in :ref:`Work with edX Documentation Source Files`.</p><p>This file covers the following topics.</p><value>Null</value><p> :local: :depth: 1</p><p><h1>Heading Levels</h1><p>############# -Heading 1 -############# - -************* -Heading 2 -************* - -=========== -Heading 3 -=========== - -Heading 4 -************ - -Heading 5 -=========== - -Heading 6 -~~~~~~~~~~~ -</p></p><p><h1>Paragraph Text and Commented Text</h1><p>This is an example of regular text in paragraph form. There are no indents. As a best practice, break lines at about 80 characters, so that each line has its own line number for commenting in reviews.</p><value>Null</value><p>Boldface is used for labels that are visible in the user interface. The UI text is surrounded by double asterisks. For example, <strong>bold</strong>.</p><p>Italics are rarely used. Text surrounded by single asterisks is rendered in <em>italics</em>.</p><p>Monospace text is used for code examples. Text surrounded by double grave accent characters is rendered in monospace font.</p><p>.. comments can be added in a file by starting a line with 2 periods and a space.</p><p>In English source files, look for comments addressed to translators from writers.</p><p>.. Translators: In this code example, do not translate such and such.</p></p><p><h1>Ordered and Unordered Lists</h1><p>Use hash symbols for ordered lists.</p><p>::</p><p>#. Select <strong>Advanced Settings</strong>. #. Find the <strong>Course Advertised Start Date</strong> policy key. #. Enter the value you want to display.</p><value>Null</value><p> Ordered lists usually use numerals. Nested ordered lists (ordered lists inside other ordered lists) use letters.</p><p>Use asterisks for unordered (bulleted) lists.</p><p>::</p><value>Null</value><p><h1>Nested Lists or Content</h1><p>You can include content including additional lists and code examples inside lists.</p><p><h1>Unordered List inside Ordered List</h1><p>To include an unordered list inside an ordered list, indent the unordered list three spaces. The first bullet in the unordered list must be flush with the text in the ordered list.</p><p>#. Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - * In this example, the key for the Annotation Problem tool is the only - value in the list. - - * In this example, the key for the Annotation Problem tool is added at - the beginning of a list of other keys. - -#. Select **Save Changes**. -</p><img src="/Images/Lists_UL_inside_OL.png"/><p> :width: 500 :alt: An unordered (bulleted) list inside an ordered (numbered) list.</p></p><p><h1>Ordered List inside Unordered List</h1><p>To include an ordered list inside an unordered list, indent the ordered list two spaces. The first number or letter of the ordered list must be flush with the text in the unordered list.</p><p>* Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be comma - separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at the - beginning of a list of other keys. - -* Select **Save Changes**. -</p><value>Null</value><value>Null</value><value>Null</value></p><p><h1>Unordered List inside Unordered List</h1><p>To include an unordered list inside another unordered list, indent the second unordered list two spaces. The first bullet of the second unordered list must be flush with the text in the unordered list.</p><p>* Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at the - beginning of a list of other keys. - -* Select **Save Changes**. -</p><img src="/Images/Lists_UL_inside_UL.png"/><p> :width: 500 :alt: An ordered (numbered) list inside an unordered (bulleted) list.</p></p><p><h1>Ordered List inside Ordered List</h1><p>To include another ordered list inside an ordered list, indent the second ordered list three spaces. The second ordered list must be flush with the text in the numbered list. The first ordered list uses numerals, and the second uses letters.</p><p>#. Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at - the beginning of a list of other keys. - -#. Select **Save Changes**. -</p><value>Null</value><value>Null</value><value>Null</value></p><p><h1>Code, Images, and Other Content inside Lists</h1><p>To include content such as code or an image inside a list, position the code or image directive flush with the text in the list. That is, indent three spaces for ordered lists and two spaces for unordered lists.</p><p>#. In the ``lms.yml`` and ``studio.yml`` files, set the value of - ``CERTIFICATES_HTML_VIEW`` within the ``FEATURES`` object to ``true``. - - .. code-block:: bash - - "FEATURES": { - ... - 'CERTIFICATES_HTML_VIEW': true, - ... - } - -#. Save the ``lms.yml`` and ``studio.yml`` files. -</p></p></p></p><p><h1>Conditional Text</h1><p>To conditionalize a single paragraph, use either the only:: Partners or the only:: Open_edX directive, and indent the paragraph under the directive. You can add the conditional text as regular text or as a note.</p><p>Make sure to indent the paragraph under the directive.</p><p>.. only:: Partners - - Data about course enrollment is available from edX Insights. You can access - Insights from the instructor dashboard for your live course: after you select - **Instructor**, follow the link in the banner at the top of each page. For - more information, see `Using edX Insights`_. - -.. only:: Open_edX - - .. note:: - If you want to require an entrance exam for your course, you also create - the exam in the course outline. Before you can create an exam, you must - set your course to require an entrance exam in Studio. For more - information, see :ref:`Require an Entrance Exam`. -</p><p>To conditionalize more than a paragraph, use either the only:: Partners or the only:: Open_edX directive, and then use an include:: directive indented under the only directive.</p><p>.. only:: Open_edX - - .. include:: ../../../shared/building_and_running_chapters/running_course/Section_course_student.rst -</p></p><p><h1>Notes and Warnings</h1><p>.. note:: - This is note text. If note text runs over a line, make sure the lines wrap - and are indented to the same level as the note tag. If formatting is - incorrect, part of the note might not render in the HTML output. - - Notes can have more than one paragraph. Successive paragraphs must indent - to the same level as the rest of the note. -</p><value>Null</value><p> Notes can have more than one paragraph. Successive paragraphs must indent to the same level as the rest of the note.</p><p>.. warning:: - Warnings are formatted in the same way as notes. In the same way, lines - must be broken and indented under the warning tag. -</p><value>Null</value></p><p><h1>Cross-References</h1><p>In edX documents, you can include cross-references to other locations in the same edX document, to locations in other edX documents (such as a cross- reference from a location in the <em>Building and Running an edX Course</em> guide to a location in the <em>EdX Learner's Guide</em>), to JIRA stories, and to external websites. In this section, "EdX documents" refers to the resources, including guides and tutorials, that are listed on docs.edx.org.</p><p>For more information about creating cross-references using RST and Sphinx, see <value>Null</value> in the online Sphinx documentation.</p><p><h1>Cross-References to Locations in the Same Document</h1><p>Cross-references to locations in the same document use anchors that are located above the heading for each topic or section. Anchors can contain numbers, letters, spaces, underscores, and hyphens, but cannot include punctuation. Anchors use the following syntax.</p><p>.. _Anchor Text: -</p><p>The following example shows an anchor for a section, followed by the heading for that section. SFD SN Keyboard Shortcuts is the anchor text.</p><p>.. _SFD SN Keyboard Shortcuts: - -****************************** -Keyboard Shortcuts for Notes -****************************** -</p><p>To create cross-references to locations in the same document, you can use the anchor only, or you can use your own text. The anchor text is never visible in output. It is replaced by the text of the heading that follows the anchor or the text that you specify.</p><p><h1>Cross-References Using the Anchor Only</h1><p>To add a cross-reference to a specific location in a document and use the text of the heading for that location as link text, use :ref:`Anchor Text` syntax, as in the following example.</p><p>For more information about using keyboard shortcuts, see :ref:`SFD SN -Keyboard Shortcuts`. -</p><p>In this example, "SFD SN Keyboard Shortcuts" is the anchor text for a section that is titled "Keyboard Shortcuts for Notes". Readers will see the following text, and "Keyboard Shortcuts for Notes" will be an active link.</p><p>For more information about using keyboard shortcuts, see Keyboard Shortcuts -for Notes. -</p></p><p><h1>Cross-References Using Specified Link Text</h1><p>For internal cross-references that use text other than the heading for the section that you're linking to, use :ref:`specified text&lt;Anchor Text>` syntax, as in the following example.</p><p>If you want to, you can use :ref:`keyboard shortcuts&lt;SFD SN Keyboard -Shortcuts>` to create, edit, and view notes. -</p><value>Null</value><p> Do not include a space between the last word of the link text and the opening angle bracket for the anchor text.</p><p>In this example, "keyboard shortcuts" is the link text, and "SFD SN Keyboard Shortcuts" is the anchor text for a section that is titled "Keyboard Shortcuts for Notes". Readers will see the following text, and "keyboard shortcuts" will be an active link.</p><p>If you want to, you can use keyboard shortcuts to create, edit, and view your -notes. -</p></p></p><p><h1>Cross-References to Locations in Different edX Documents</h1><p>You can create cross-references between different edX documents. For example, you can create a link in <em>Building and Running an edX Course</em> to a topic in the <em>EdX Learner's Guide</em>. To do this, you use the intersphinx map ID of the document that you want to link to and the anchor text for the section you want. The cross-reference uses the following syntax.</p><p>:ref:`intersphinx_map_ID:Anchor Name` -</p><p>For example:</p><p>:ref:`partnercoursestaff:Release Dates` -</p><p>To find the intersphinx map ID for the document that you want, follow these steps.</p><p>#. Open the conf.py file in the <value>Null</value> folder, and then locate the following line.</p><p> intersphinx_mapping = {</p><p>#. In the list that follows this line, find the ID for the document that you want. The text between the single quotation marks (') at the beginning of each line is the intersphinx map ID for the document.</p><p>The following intersphinx map IDs are the most frequently used.</p><value>Null</value><p> * - Map ID - Document * - partnercoursestaff - <em>Building and Running an edX Course</em> * - opencoursestaff - <em>Building and Running an Open edX Course</em> * - learners - <em>EdX Learner's Guide</em> * - openlearners - <em>Open edX Learner's Guide</em> * - data - <em>EdX Research Guide</em> * - insights - <em>Using edX Insights</em> * - installation - <em>Installing, Configuring, and Running the Open edX Platform</em> * - opendevelopers - <em>Open edX Developer's Guide</em> * - partnerreleasenotes - Partner release notes * - openreleasenotes - Open edX release notes</p></p><p><h1>Cross-References to JIRA</h1><p>For cross-references to JIRA tickets, use the :jira:`PROJECT-ticketnumber` syntax, as in the following example.</p><p>For more information, see :jira:`DOC-2316`. -</p><p>Note that jira replaces ref for these links.</p><p>Readers will see the following text, and "DOC-2316" will be an active link.</p><p>For more information, see DOC-2316.</p></p><p><h1>Cross-References to External Web Pages</h1><p>A cross-reference to an external web page has several elements.</p><value>Null</value><value>Null</value><p>To create an external cross-reference, follow these steps.</p><p>#. In the paragraph where you want the cross-reference, add the text that you want to use for the link, formatted as follows (where "Release Pages" is the link text). This creates an anchor out of that text.</p><p> ::</p><p> The edX engineering wiki <value>Null</value> provide access to detailed information about every change made to the edx-platform GitHub repository.</p><p>#. In the file that contains the cross-reference, add an include directive for the edx-documentation/en_us/links/links.rst file if one does not already exist. These include directives are typically at the end of the file.</p><p> ::</p><p> .. include:: ../../links/links.rst</p><p> .. note::</p><p> The path to the links.rst file depends on the location of the file where you are creating the link. For example, the path might be ../../../links/links.rst or ../links/links.rst.</p><p>#. In the edx-documentation/en_us/links/links.rst file, add an entry for the anchor text and the URL of the external website, formatted as follows. Make sure that the anchor text in this file matches the anchor text in the file that contains the cross-reference exactly, including capitalization.</p><p> ::</p><p> .. _Release Pages: <value>Null</value></p><p>Readers will see the following text. "Release Pages" will be an active link.</p><p>The edX engineering wiki Release Pages provide access to detailed -information about every change made to the edx-platform GitHub -repository. -</p></p></p><p><h1>Image References</h1><p><h1>Image references look like this.</h1><p> .. image:: /Images/Course_Outline_LMS.png :width: 100 :alt: A screen capture showing the elements of the course outline in the LMS.</p><p>Image links can include optional specifications such as height, width, or scale. Alternative text for screen readers is required for each image. Provide text that is useful to someone who might not be able to see the image.</p><value>Null</value></p></p><p><h1>Tables</h1><p>Each example in this section shows the raw formatting for the table followed by the table as it would render (if you are viewing this file as part of the Style Guide).</p><p><h1>Example of a table with an empty cell</h1><p><h1>The empty cell is the second column in the first row of this table.</h1><p> .. list-table:: :widths: 25 25 50</p><p> * - Annotation Problem - - Annotation problems ask students to respond to questions about a specific block of text. The question appears above the text when the student hovers the mouse over the highlighted text so that students can think about the question as they read. * - Example Poll - Conditional Module - You can create a conditional module to control versions of content that groups of students see. For example, students who answer "Yes" to a poll question then see a different block of text from the students who answer "No" to that question. * - Example JavaScript Problem - Custom JavaScript - Custom JavaScript display and grading problems (also called *custom JavaScript problems* or <em>JS input problems</em>) allow you to create a custom problem or tool that uses JavaScript and then add the problem or tool directly into Studio.</p><value>Null</value></p></p><p><h1>Example of a table with a header row</h1><p>.. list-table:: - :widths: 15 15 70 - :header-rows: 1 - - * - First Name - - Last Name - - Residence - * - Elizabeth - - Bennett - - Longbourne - * - Fitzwilliam - - Darcy - - Pemberley -</p><value>Null</value></p><p><h1>Example of a table with a boldface first column</h1><p>.. list-table:: - :widths: 15 15 70 - :stub-columns: 1 - - * - First Name - - Elizabeth - - Fitzwilliam - * - Last Name - - Bennett - - Darcy - * - Residence - - Longboure - - Pemberley -</p><value>Null</value></p><p><h1>Example of a table with a cell that includes an unordered list</h1><p>The blank lines before and after the unordered list are critical for the list to render correctly.</p><p>.. list-table:: - :widths: 15 15 60 - :header-rows: 1 - - * - Field - - Type - - Details - * - ``correct_map`` - - dict - - For each problem ID value listed by ``answers``, provides: - - * ``correctness``: string; 'correct', 'incorrect' - * ``hint``: string; Gives optional hint. Nulls allowed. - * ``hintmode``: string; None, 'on_request', 'always'. Nulls allowed. - * ``msg``: string; Gives extra message response. - * ``npoints``: integer; Points awarded for this ``answer_id``. Nulls allowed. - * ``queuestate``: dict; None when not queued, else ``{key:'', time:''}`` - where ``key`` is a secret string dump of a DateTime object in the form - '%Y%m%d%H%M%S'. Nulls allowed. - - * - ``grade`` - - integer - - Current grade value. - * - ``max_grade`` - - integer - - Maximum possible grade value. -</p><value>Null</value></p></p><p><h1>Code Formatting</h1><p><h1>Inline code</h1><p>In inline text, any text can be formatted as code (monospace font) by enclosing the selection within a pair of double "grave accent" characters (`). For example, ``these words`` are formatted in a monospace font when the documentation is output as PDF or HTML.</p></p><p><h1>Code blocks</h1><p>To set text in a code block, end the previous paragaph with 2 colons, leave one line before the intended code block, and make sure the code block is indented beyond the first colon. ::</p><p> For example, this is the introductory paragraph ::</p><p> &lt;p>and this is the code block following.&lt;/p></p><p>Alternatively, use the code-block tag. Optionally, indicate the type of code after the 2 colons in the tag, which results in the tags within the code block being displayed in different colors. ::</p><p> .. code-block:: xml</p><p> &lt;problem> &lt;annotationresponse> &lt;annotationinput> &lt;text>PLACEHOLDER: Text of annotation&lt;/text> &lt;comment>PLACEHOLDER: Text of question&lt;/comment> &lt;comment_prompt>PLACEHOLDER: Type your response below:&lt;/comment_prompt> &lt;tag_prompt>PLACEHOLDER: In your response to this question, which tag below do you choose?&lt;/tag_prompt> &lt;options> &lt;option choice="incorrect">PLACEHOLDER: Incorrect answer (to make this option a correct or partially correct answer, change choice="incorrect" to choice="correct" or choice="partially-correct")&lt;/option> &lt;option choice="correct">PLACEHOLDER: Correct answer (to make this option an incorrect or partially correct answer, change choice="correct" to choice="incorrect" or choice="partially-correct")&lt;/option> &lt;option choice="partially-correct">PLACEHOLDER: Partially correct answer (to make this option a correct or partially correct answer, change choice="partially-correct" to choice="correct" or choice="incorrect") &lt;/option> &lt;/options> &lt;/annotationinput> &lt;/annotationresponse> &lt;solution> &lt;p>PLACEHOLDER: Detailed explanation of solution&lt;/p> &lt;/solution> &lt;/problem></p><value>Null</value></p></p></p></div></html> \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/rst/example.rst b/projects/panduck-dioxus/tests/rst/example.rst deleted file mode 100644 index f99b7e2..0000000 --- a/projects/panduck-dioxus/tests/rst/example.rst +++ /dev/null @@ -1,808 +0,0 @@ -.. _Anchor For ExampleRSTFile: - -################# -Example .rst File -################# - -If you work with edX documentation source files, you might find this file -helpful as a reference. This file contains examples of .rst formatting. - -Explanations and more context for each type of element are provided in -:ref:`Work with edX Documentation Source Files`. - -This file covers the following topics. - -.. contents:: - :local: - :depth: 1 - -*************** -Heading Levels -*************** - -:: - - ############# - Heading 1 - ############# - - ************* - Heading 2 - ************* - - =========== - Heading 3 - =========== - - Heading 4 - ************ - - Heading 5 - =========== - - Heading 6 - ~~~~~~~~~~~ - -************************************************ -Paragraph Text and Commented Text -************************************************ - -This is an example of regular text in paragraph form. There are no indents. As -a best practice, break lines at about 80 characters, so that each line has its -own line number for commenting in reviews. - -.. warning:: Throughout text and code examples, make sure double quotation - marks and apostrophes are straight (") or ('), not curly quotatation marks - and apostrophes, which might be introduced when text is cut and pasted from - other sources or editors. - -Boldface is used for labels that are visible in the user interface. The UI -text is surrounded by double asterisks. For example, **bold**. - -Italics are rarely used. Text surrounded by single asterisks is rendered in -*italics*. - -Monospace text is used for ``code examples``. Text surrounded by double grave -accent characters is rendered in monospace font. - -``.. comments can be added in a file by starting a line with 2 periods and a space.`` - -In English source files, look for comments addressed to translators from writers. - -``.. Translators: In this code example, do not translate such and such.`` - - -*************************************** -Ordered and Unordered Lists -*************************************** - -Use hash symbols for ordered lists. - -:: - -#. Select **Advanced Settings**. -#. Find the **Course Advertised Start Date** policy key. -#. Enter the value you want to display. - -.. note:: - Ordered lists usually use numerals. Nested ordered lists (ordered lists inside - other ordered lists) use letters. - -Use asterisks for unordered (bulleted) lists. - -:: - -* Who is teaching the course? -* What university or college is the course affiliated with? -* What topics and concepts are covered in your course? -* Why should a learner enroll in your course? - -======================= -Nested Lists or Content -======================= - -You can include content including additional lists and code examples inside -lists. - -Unordered List inside Ordered List -*************************************** - -To include an unordered list inside an ordered list, indent the unordered list -three spaces. The first bullet in the unordered list must be flush with the -text in the ordered list. - -:: - - #. Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - * In this example, the key for the Annotation Problem tool is the only - value in the list. - - * In this example, the key for the Annotation Problem tool is added at - the beginning of a list of other keys. - - #. Select **Save Changes**. - -.. image:: /Images/Lists_UL_inside_OL.png - :width: 500 - :alt: An unordered (bulleted) list inside an ordered (numbered) list. - -Ordered List inside Unordered List -*************************************** - -To include an ordered list inside an unordered list, indent the ordered list -two spaces. The first number or letter of the ordered list must be flush with -the text in the unordered list. - -:: - - * Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be comma - separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at the - beginning of a list of other keys. - - * Select **Save Changes**. - -.. There isn't a screen shot of the above example yet because these lists don't -.. render correctly locally, and searching for an example in the built docs -.. online was taking too much time. - -Unordered List inside Unordered List -*************************************** - -To include an unordered list inside another unordered list, indent the second -unordered list two spaces. The first bullet of the second unordered list must -be flush with the text in the unordered list. - -:: - - * Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at the - beginning of a list of other keys. - - * Select **Save Changes**. - -.. image:: /Images/Lists_UL_inside_UL.png - :width: 500 - :alt: An ordered (numbered) list inside an unordered (bulleted) list. - -Ordered List inside Ordered List -*************************************** - -To include another ordered list inside an ordered list, indent the second -ordered list three spaces. The second ordered list must be flush with the text -in the numbered list. The first ordered list uses numerals, and the second -uses letters. - -:: - - #. Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at - the beginning of a list of other keys. - - #. Select **Save Changes**. - -.. There isn't a screen shot of the above example yet because these lists don't -.. render correctly locally, and searching for an example in the built docs -.. online was taking too much time. - -Code, Images, and Other Content inside Lists -********************************************* - -To include content such as code or an image inside a list, position the code or -image directive flush with the text in the list. That is, indent three spaces -for ordered lists and two spaces for unordered lists. - -:: - - #. In the ``lms.yml`` and ``studio.yml`` files, set the value of - ``CERTIFICATES_HTML_VIEW`` within the ``FEATURES`` object to ``true``. - - .. code-block:: bash - - "FEATURES": { - ... - 'CERTIFICATES_HTML_VIEW': true, - ... - } - - #. Save the ``lms.yml`` and ``studio.yml`` files. - - -*************************************** -Conditional Text -*************************************** - -To conditionalize a single paragraph, use either the ``only:: Partners`` or -the ``only:: Open_edX`` directive, and indent the paragraph under the -directive. You can add the conditional text as regular text or as a note. - -Make sure to indent the paragraph under the directive. - -:: - - .. only:: Partners - - Data about course enrollment is available from edX Insights. You can access - Insights from the instructor dashboard for your live course: after you select - **Instructor**, follow the link in the banner at the top of each page. For - more information, see `Using edX Insights`_. - - .. only:: Open_edX - - .. note:: - If you want to require an entrance exam for your course, you also create - the exam in the course outline. Before you can create an exam, you must - set your course to require an entrance exam in Studio. For more - information, see :ref:`Require an Entrance Exam`. - -To conditionalize more than a paragraph, use either the ``only:: Partners`` or -the ``only:: Open_edX`` directive, and then use an ``include::`` directive -indented under the only directive. - -:: - - .. only:: Open_edX - - .. include:: ../../../shared/building_and_running_chapters/running_course/Section_course_student.rst - - - -********************************* -Notes and Warnings -********************************* - -:: - - .. note:: - This is note text. If note text runs over a line, make sure the lines wrap - and are indented to the same level as the note tag. If formatting is - incorrect, part of the note might not render in the HTML output. - - Notes can have more than one paragraph. Successive paragraphs must indent - to the same level as the rest of the note. - -.. note:: - This is note text. If note text runs over a line, make sure the lines wrap - and are indented to the same level as the note tag. If formatting is - incorrect, part of the note might not render in the HTML output. - - Notes can have more than one paragraph. Successive paragraphs must indent to - the same level as the rest of the note. - - -:: - - .. warning:: - Warnings are formatted in the same way as notes. In the same way, lines - must be broken and indented under the warning tag. - - -.. warning:: - Warnings are formatted in the same way as notes. In the same way, lines must - be broken and indented under the warning tag. - - -**************************** -Cross-References -**************************** - -In edX documents, you can include cross-references to other locations in the -same edX document, to locations in other edX documents (such as a cross- -reference from a location in the *Building and Running an edX Course* guide to -a location in the *EdX Learner's Guide*), to JIRA stories, and to external -websites. In this section, "EdX documents" refers to the resources, including -guides and tutorials, that are listed on docs.edx.org. - -For more information about creating cross-references using RST and Sphinx, see -`Cross-referencing arbitrary locations`_ in the online Sphinx documentation. - -================================================== -Cross-References to Locations in the Same Document -================================================== - -Cross-references to locations in the same document use anchors that are located -above the heading for each topic or section. Anchors can contain numbers, -letters, spaces, underscores, and hyphens, but cannot include punctuation. -Anchors use the following syntax. - -:: - - .. _Anchor Text: - -The following example shows an anchor for a section, followed by the heading -for that section. ``SFD SN Keyboard Shortcuts`` is the anchor text. - -:: - - .. _SFD SN Keyboard Shortcuts: - - ****************************** - Keyboard Shortcuts for Notes - ****************************** - -To create cross-references to locations in the same document, you can use the -anchor only, or you can use your own text. The anchor text is never visible in -output. It is replaced by the text of the heading that follows the anchor or -the text that you specify. - -Cross-References Using the Anchor Only -******************************************** - -To add a cross-reference to a specific location in a document and use the text -of the heading for that location as link text, use ``:ref:`Anchor Text``` -syntax, as in the following example. - -:: - - For more information about using keyboard shortcuts, see :ref:`SFD SN - Keyboard Shortcuts`. - -In this example, "SFD SN Keyboard Shortcuts" is the anchor text for a section -that is titled "Keyboard Shortcuts for Notes". Readers will see the following -text, and "Keyboard Shortcuts for Notes" will be an active link. - -:: - - For more information about using keyboard shortcuts, see Keyboard Shortcuts - for Notes. - -Cross-References Using Specified Link Text -******************************************* - -For internal cross-references that use text other than the heading for the -section that you're linking to, use ``:ref:`specified text<Anchor Text>``` -syntax, as in the following example. - -:: - - If you want to, you can use :ref:`keyboard shortcuts<SFD SN Keyboard - Shortcuts>` to create, edit, and view notes. - -.. note:: - Do not include a space between the last word of the link text and the opening - angle bracket for the anchor text. - -In this example, "keyboard shortcuts" is the link text, and "SFD SN Keyboard -Shortcuts" is the anchor text for a section that is titled "Keyboard Shortcuts -for Notes". Readers will see the following text, and "keyboard shortcuts" will -be an active link. - -:: - - If you want to, you can use keyboard shortcuts to create, edit, and view your - notes. - -========================================================== -Cross-References to Locations in Different edX Documents -========================================================== - -You can create cross-references between different edX documents. For example, -you can create a link in *Building and Running an edX Course* to a topic in the -*EdX Learner's Guide*. To do this, you use the intersphinx map ID of the -document that you want to link to and the anchor text for the section you want. -The cross-reference uses the following syntax. - -:: - - :ref:`intersphinx_map_ID:Anchor Name` - -For example: - -:: - - :ref:`partnercoursestaff:Release Dates` - -To find the intersphinx map ID for the document that you want, follow these -steps. - -#. Open the conf.py file in the `edx-documentation/shared`_ folder, and then - locate the following line. - - ``intersphinx_mapping = {`` - -#. In the list that follows this line, find the ID for the document that you - want. The text between the single quotation marks (') at the beginning of - each line is the intersphinx map ID for the document. - -The following intersphinx map IDs are the most frequently used. - -.. list-table:: - :widths: 25 25 50 - - * - Map ID - - Document - * - ``partnercoursestaff`` - - *Building and Running an edX Course* - * - ``opencoursestaff`` - - *Building and Running an Open edX Course* - * - ``learners`` - - *EdX Learner's Guide* - * - ``openlearners`` - - *Open edX Learner's Guide* - * - ``data`` - - *EdX Research Guide* - * - ``insights`` - - *Using edX Insights* - * - ``installation`` - - *Installing, Configuring, and Running the Open edX Platform* - * - ``opendevelopers`` - - *Open edX Developer's Guide* - * - ``partnerreleasenotes`` - - Partner release notes - * - ``openreleasenotes`` - - Open edX release notes - -============================================ -Cross-References to JIRA -============================================ - -For cross-references to JIRA tickets, use the ``:jira:`PROJECT-ticketnumber``` -syntax, as in the following example. - -:: - - For more information, see :jira:`DOC-2316`. - -Note that ``jira`` replaces ``ref`` for these links. - -Readers will see the following text, and "DOC-2316" will be an active link. - -``For more information, see DOC-2316.`` - -============================================ -Cross-References to External Web Pages -============================================ - -A cross-reference to an external web page has several elements. - -* The URL of the external web page. -* The text to use for the cross-reference. This text becomes an anchor in the - file that contains the cross-reference. -* An ``include`` directive in the file that contains the cross-reference to the - links.rst file that is located in the ``edx-documentation/en_us/links/`` - folder. -* An entry in the links.rst file. - -To create an external cross-reference, follow these steps. - -#. In the paragraph where you want the cross-reference, add the text that you - want to use for the link, formatted as follows (where "Release Pages" is the - link text). This creates an anchor out of that text. - - :: - - The edX engineering wiki `Release Pages`_ provide access to detailed - information about every change made to the edx-platform GitHub - repository. - -#. In the file that contains the cross-reference, add an ``include`` directive - for the ``edx-documentation/en_us/links/links.rst`` file if one does not - already exist. These ``include`` directives are typically at the end of the - file. - - :: - - .. include:: ../../links/links.rst - - .. note:: - - The path to the links.rst file depends on the location of the file where - you are creating the link. For example, the path might be - ``../../../links/links.rst`` or ``../links/links.rst``. - -#. In the ``edx-documentation/en_us/links/links.rst`` file, add an entry for - the anchor text and the URL of the external website, formatted as follows. - Make sure that the anchor text in this file matches the anchor text in the - file that contains the cross-reference exactly, including capitalization. - - :: - - .. _Release Pages: https://openedx.atlassian.net/wiki/display/ENG/Release+Pages - -Readers will see the following text. "Release Pages" will be an active link. - -:: - - The edX engineering wiki Release Pages provide access to detailed - information about every change made to the edx-platform GitHub - repository. - - -**************************** -Image References -**************************** - -Image references look like this. -:: - - .. image:: /Images/Course_Outline_LMS.png - :width: 100 - :alt: A screen capture showing the elements of the course outline in the LMS. - - -Image links can include optional specifications such as height, width, or -scale. Alternative text for screen readers is required for each image. Provide -text that is useful to someone who might not be able to see the image. - - -.. _Examples of Tables: - -************************************ -Tables -************************************ - -Each example in this section shows the raw formatting for the table followed -by the table as it would render (if you are viewing this file as part of the -Style Guide). - -====================================== -Example of a table with an empty cell -====================================== - -The empty cell is the second column in the first row of this table. -:: - - .. list-table:: - :widths: 25 25 50 - - * - Annotation Problem - - - - Annotation problems ask students to respond to questions about a - specific block of text. The question appears above the text when the - student hovers the mouse over the highlighted text so that students can - think about the question as they read. - * - Example Poll - - Conditional Module - - You can create a conditional module to control versions of content that - groups of students see. For example, students who answer "Yes" to a - poll question then see a different block of text from the students who - answer "No" to that question. - * - Example JavaScript Problem - - Custom JavaScript - - Custom JavaScript display and grading problems (also called *custom - JavaScript problems* or *JS input problems*) allow you to create a - custom problem or tool that uses JavaScript and then add the problem or - tool directly into Studio. - -.. list-table:: - :widths: 25 25 50 - - * - Annotation Problem - - - - Annotation problems ask students to respond to questions about a - specific block of text. The question appears above the text when the - student hovers the mouse over the highlighted text so that students can - think about the question as they read. - * - Example Poll - - Conditional Module - - You can create a conditional module to control versions of content that - groups of students see. For example, students who answer "Yes" to a - poll question then see a different block of text from the students who - answer "No" to that question. - * - Exampel JavaScript Problem - - Custom JavaScript - - Custom JavaScript display and grading problems (also called *custom - JavaScript problems* or *JS input problems*) allow you to create a - custom problem or tool that uses JavaScript and then add the problem or - tool directly into Studio. - -==================================== -Example of a table with a header row -==================================== - -:: - - .. list-table:: - :widths: 15 15 70 - :header-rows: 1 - - * - First Name - - Last Name - - Residence - * - Elizabeth - - Bennett - - Longbourne - * - Fitzwilliam - - Darcy - - Pemberley - - -.. list-table:: - :widths: 15 15 70 - :header-rows: 1 - - * - First Name - - Last Name - - Residence - * - Elizabeth - - Bennett - - Longbourne - * - Fitzwilliam - - Darcy - - Pemberley - - -=============================================== -Example of a table with a boldface first column -=============================================== - -:: - - .. list-table:: - :widths: 15 15 70 - :stub-columns: 1 - - * - First Name - - Elizabeth - - Fitzwilliam - * - Last Name - - Bennett - - Darcy - * - Residence - - Longboure - - Pemberley - - -.. list-table:: - :widths: 15 15 70 - :stub-columns: 1 - - * - First Name - - Elizabeth - - Fitzwilliam - * - Last Name - - Bennett - - Darcy - * - Residence - - Longboure - - Pemberley - -============================================================== -Example of a table with a cell that includes an unordered list -============================================================== - -The blank lines before and after the unordered list are critical for the list -to render correctly. - -:: - - .. list-table:: - :widths: 15 15 60 - :header-rows: 1 - - * - Field - - Type - - Details - * - ``correct_map`` - - dict - - For each problem ID value listed by ``answers``, provides: - - * ``correctness``: string; 'correct', 'incorrect' - * ``hint``: string; Gives optional hint. Nulls allowed. - * ``hintmode``: string; None, 'on_request', 'always'. Nulls allowed. - * ``msg``: string; Gives extra message response. - * ``npoints``: integer; Points awarded for this ``answer_id``. Nulls allowed. - * ``queuestate``: dict; None when not queued, else ``{key:'', time:''}`` - where ``key`` is a secret string dump of a DateTime object in the form - '%Y%m%d%H%M%S'. Nulls allowed. - - * - ``grade`` - - integer - - Current grade value. - * - ``max_grade`` - - integer - - Maximum possible grade value. - - -.. list-table:: - :widths: 15 15 60 - :header-rows: 1 - - * - Field - - Type - - Details - * - ``correct_map`` - - dict - - For each problem ID value listed by ``answers``, provides: - - * ``correctness``: string; 'correct', 'incorrect' - * ``hint``: string; Gives optional hint. Nulls allowed. - * ``hintmode``: string; None, 'on_request', 'always'. Nulls allowed. - * ``msg``: string; Gives extra message response. - * ``npoints``: integer; Points awarded for this ``answer_id``. Nulls allowed. - * ``queuestate``: dict; None when not queued, else ``{key:'', time:''}`` - where ``key`` is a secret string dump of a DateTime object in the form - '%Y%m%d%H%M%S'. Nulls allowed. - - * - ``grade`` - - integer - - Current grade value. - * - ``max_grade`` - - integer - - Maximum possible grade value. - - -***************** -Code Formatting -***************** - -=========== -Inline code -=========== - -In inline text, any text can be formatted as code (monospace font) by -enclosing the selection within a pair of double "grave accent" characters (`). -For example, ````these words```` are formatted in a monospace font when the -documentation is output as PDF or HTML. - -=========== -Code blocks -=========== - - -To set text in a code block, end the previous paragaph with 2 colons, leave -one line before the intended code block, and make sure the code block is -indented beyond the first colon. -:: - - For example, this is the introductory paragraph - :: - - <p>and this is the code block following.</p> - - -Alternatively, use the code-block tag. Optionally, indicate the type of code -after the 2 colons in the tag, which results in the tags within the code block -being displayed in different colors. -:: - - .. code-block:: xml - - <problem> - <annotationresponse> - <annotationinput> - <text>PLACEHOLDER: Text of annotation</text> - <comment>PLACEHOLDER: Text of question</comment> - <comment_prompt>PLACEHOLDER: Type your response below:</comment_prompt> - <tag_prompt>PLACEHOLDER: In your response to this question, which tag below - do you choose?</tag_prompt> - <options> - <option choice="incorrect">PLACEHOLDER: Incorrect answer (to make this - option a correct or partially correct answer, change choice="incorrect" - to choice="correct" or choice="partially-correct")</option> - <option choice="correct">PLACEHOLDER: Correct answer (to make this option - an incorrect or partially correct answer, change choice="correct" to - choice="incorrect" or choice="partially-correct")</option> - <option choice="partially-correct">PLACEHOLDER: Partially correct answer - (to make this option a correct or partially correct answer, - change choice="partially-correct" to choice="correct" or choice="incorrect") - </option> - </options> - </annotationinput> - </annotationresponse> - <solution> - <p>PLACEHOLDER: Detailed explanation of solution</p> - </solution> - </problem> - -.. include:: ../../links/links.rst diff --git a/projects/panduck-dioxus/tests/rst/header.html b/projects/panduck-dioxus/tests/rst/header.html deleted file mode 100644 index 40923c9..0000000 --- a/projects/panduck-dioxus/tests/rst/header.html +++ /dev/null @@ -1 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><value>Null</value><p><h1>一级标题</h1><p>源码 ::</p><p> ============ 一级标题 ============</p><p> = 的数量为标题的长度,不同于二级标题,一级标题,上下层都要包含=。</p><p><h1>二级标题</h1><p>源码 ::</p><p> 二级标题 ============</p><p> = 的数量为标题的长度。</p><p><h1>三级标题</h1><p>源码 ::</p><p> 三级标题 ----------</p><p> - 的数量为标题的长度。</p><p><h1>四级标题</h1><p>源码 ::</p><p> 四级标题 ^^^^^^^^^^^</p><p> ^ 的数量为标题的长度。</p><p><h1>五级标题</h1><p>源码 ::</p><p> 五级标题 """"""""""""</p><p> " 的数量为标题的长度。</p><p><h1>六级标题</h1><p>源码 ::</p><p> 六级标题 ***********</p><p> * 的数量为标题的长度。</p></p></p></p></p></p></p></div></html> \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/rst/header.rst b/projects/panduck-dioxus/tests/rst/header.rst deleted file mode 100644 index 9cd5670..0000000 --- a/projects/panduck-dioxus/tests/rst/header.rst +++ /dev/null @@ -1,65 +0,0 @@ -.. index:: - single: 标题 - -============ -一级标题 -============ - -源码 :: - - ============ - 一级标题 - ============ - - = 的数量为标题的长度,不同于二级标题,一级标题,上下层都要包含=。 - -二级标题 -============ - -源码 :: - - 二级标题 - ============ - - = 的数量为标题的长度。 - -三级标题 ----------- - -源码 :: - - 三级标题 - ---------- - - - 的数量为标题的长度。 - -四级标题 -^^^^^^^^^^^ - -源码 :: - - 四级标题 - ^^^^^^^^^^^ - - ^ 的数量为标题的长度。 - -五级标题 -"""""""""""" - -源码 :: - - 五级标题 - """""""""""" - - " 的数量为标题的长度。 - - -六级标题 -*********** - -源码 :: - - 六级标题 - *********** - - * 的数量为标题的长度。 \ No newline at end of file diff --git a/projects/panduck-dioxus/tests/rst/mod.rs b/projects/panduck-dioxus/tests/rst/mod.rs deleted file mode 100644 index a37941a..0000000 --- a/projects/panduck-dioxus/tests/rst/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -use super::*; - -pub fn html_standalone(source: &str, target: &str) -> Result<()> { - html_standalone_builder(panduck_core::convert::parse_rst)(source, target) -} - -#[test] -pub fn example() -> Result<()> { - html_standalone(include_str!("example.rst"), include_str!("example.html"))?; - Ok(()) -} - -#[test] -pub fn header() -> Result<()> { - html_standalone(include_str!("header.rst"), include_str!("header.html"))?; - Ok(()) -} diff --git a/projects/panduck-online/Cargo.toml b/projects/panduck-online/Cargo.toml deleted file mode 100644 index 1b9ba46..0000000 --- a/projects/panduck-online/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "panduck-online" -version = "0.4.0" -authors = ["Aster <192607617@qq.com>"] -description = "Conversion tool by rust, inspired by pandoc" -repository = "https://github.com/oovm/panduck" -readme = "../../readme.md" -license = "MPL-2.0" -edition = "2018" - -[dependencies.panduck-core] -version = "0.1.3" -path = "../panduck-core" - -[dev-dependencies] - -[features] -default = [] diff --git a/projects/panduck-online/rustfmt.toml b/projects/panduck-online/rustfmt.toml deleted file mode 100644 index f106715..0000000 --- a/projects/panduck-online/rustfmt.toml +++ /dev/null @@ -1,9 +0,0 @@ -version = "Two" -edition = "2018" -max_width = 128 - -imports_granularity="Crate" -use_small_heuristics = "Max" -control_brace_style = "ClosingNextLine" -normalize_comments = true -format_code_in_doc_comments = true \ No newline at end of file diff --git a/projects/panduck-online/src/main.rs b/projects/panduck-online/src/main.rs deleted file mode 100644 index 4b5f6d6..0000000 --- a/projects/panduck-online/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("it works!"); -} diff --git a/projects/panduck-online/tests/main.rs b/projects/panduck-online/tests/main.rs deleted file mode 100644 index cf5bed2..0000000 --- a/projects/panduck-online/tests/main.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[test] -fn ready() { - println!("it works!") -} diff --git a/projects/panduck-sycamore/Cargo.toml b/projects/panduck-sycamore/Cargo.toml deleted file mode 100644 index 0506191..0000000 --- a/projects/panduck-sycamore/Cargo.toml +++ /dev/null @@ -1,36 +0,0 @@ -[package] -name = "panduck-sycamore" -version = "0.8.0" -authors = ["Aster <192607617@qq.com>"] -description = "use panduck to generate pdfs" -repository = "https://github.com/oovm/panduck" -readme = "../../readme.md" -license = "MPL-2.0" -edition = "2018" - -[dependencies] -notedown_ast = "0.16.3" -notedown-error = "1.1.10" - -[dependencies.panduck-html] -version = "0.1.0" -path = "../panduck-html" -default-features = false - -[dependencies.sycamore] -version = "0.8.1" -features = ["ssr"] - -[dev-dependencies] -docx-rs = "0.4.3" - -[dev-dependencies.panduck-core] -version = "0.1.3" -path = "../panduck-core" -features = ["markdown", "html", "rst"] - -[features] -default = ["server"] -server = ["panduck-html/katex", "panduck-html/syntect", ] - - diff --git a/projects/panduck-sycamore/package.json b/projects/panduck-sycamore/package.json deleted file mode 100644 index 381d4be..0000000 --- a/projects/panduck-sycamore/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "scripts": { - "p": "cargo publish --allow-dirty" - } -} diff --git a/projects/panduck-sycamore/readme.md b/projects/panduck-sycamore/readme.md deleted file mode 100644 index 9bd12fc..0000000 --- a/projects/panduck-sycamore/readme.md +++ /dev/null @@ -1 +0,0 @@ -# Counting lib \ No newline at end of file diff --git a/projects/panduck-sycamore/rustfmt.toml b/projects/panduck-sycamore/rustfmt.toml deleted file mode 100644 index 5f6b2cd..0000000 --- a/projects/panduck-sycamore/rustfmt.toml +++ /dev/null @@ -1,7 +0,0 @@ -version = "Two" -edition = "2018" -max_width = 128 - -imports_granularity = "Crate" -use_small_heuristics = "Max" -control_brace_style = "ClosingNextLine" \ No newline at end of file diff --git a/projects/panduck-sycamore/src/builder/config/mod.rs b/projects/panduck-sycamore/src/builder/config/mod.rs deleted file mode 100644 index 1760578..0000000 --- a/projects/panduck-sycamore/src/builder/config/mod.rs +++ /dev/null @@ -1,27 +0,0 @@ -use panduck_html::{CodeConfig, ImageConfig, MathConfig}; - -use super::*; - -pub struct SycamoreConfig { - pub trust_raw_html: bool, - pub image_config: ImageConfig, - pub code_config: CodeConfig, - pub math_config: MathConfig, -} - -impl Default for SycamoreConfig { - fn default() -> Self { - Self { - trust_raw_html: false, - image_config: Default::default(), - code_config: Default::default(), - math_config: Default::default(), - } - } -} - -impl SycamoreConfig { - pub fn into_builder(self) -> SycamoreBuilder { - SycamoreBuilder { config: self, context: Default::default() } - } -} diff --git a/projects/panduck-sycamore/src/builder/context/mod.rs b/projects/panduck-sycamore/src/builder/context/mod.rs deleted file mode 100644 index 8331ddc..0000000 --- a/projects/panduck-sycamore/src/builder/context/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -use super::*; - -pub struct SycamoreContext {} - -impl Default for SycamoreContext { - fn default() -> Self { - Self {} - } -} diff --git a/projects/panduck-sycamore/src/builder/mod.rs b/projects/panduck-sycamore/src/builder/mod.rs deleted file mode 100644 index 516eac5..0000000 --- a/projects/panduck-sycamore/src/builder/mod.rs +++ /dev/null @@ -1,54 +0,0 @@ -use notedown_ast::ASTNode; -use sycamore::{prelude::GenericNode, render_to_string, view::View, web::SsrNode}; - -use crate::traits::IntoSycamore; - -pub use self::{config::SycamoreConfig, context::SycamoreContext}; - -mod config; -mod context; - -#[derive(Default)] -pub struct SycamoreBuilder { - config: SycamoreConfig, - context: SycamoreContext, -} - -impl SycamoreBuilder { - /// the html fragment - pub fn render(&mut self, ast: ASTNode) -> String { - let node = ast.into_sycamore(&self.config, &mut self.context); - let view = View::<SsrNode>::new_node(node); - render_to_string(|_| view) - } - /// a complete html - pub fn render_standalone(&mut self, ast: ASTNode) -> String { - let node = ast.into_sycamore(&self.config, &mut self.context); - let html = SsrNode::element_from_tag("html"); - html.append_child(&self.html_head()); - html.append_child(&node); - render_to_string(|_| View::new_node(html)) - } - - fn html_head<G: GenericNode>(&self) -> G { - let head: G = GenericNode::element_from_tag("head"); - head.append_child(&{ - let meta: G = GenericNode::element_from_tag("meta"); - meta.set_attribute("charset", "UTF-8"); - meta - }); - head.append_child(&{ - let meta: G = GenericNode::element_from_tag("meta"); - meta.set_attribute("name", "viewport-8"); - meta.set_attribute("content", "'width=device-width, initial-scale=1.0'"); - meta - }); - head.append_child(&{ - let meta: G = GenericNode::element_from_tag("link"); - meta.set_attribute("rel", "stylesheet"); - meta.set_attribute("href", "https://latex.now.sh/style.css"); - meta - }); - return head; - } -} diff --git a/projects/panduck-sycamore/src/lib.rs b/projects/panduck-sycamore/src/lib.rs deleted file mode 100644 index 86b8ed3..0000000 --- a/projects/panduck-sycamore/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub use builder::*; - -mod builder; -mod shared; -mod traits; diff --git a/projects/panduck-sycamore/src/shared/mod.rs b/projects/panduck-sycamore/src/shared/mod.rs deleted file mode 100644 index 1311510..0000000 --- a/projects/panduck-sycamore/src/shared/mod.rs +++ /dev/null @@ -1,53 +0,0 @@ -use notedown_error::Result; -use sycamore::prelude::GenericNode; - -use crate::{ - builder::{SycamoreBuilder, SycamoreConfig, SycamoreContext}, - traits::IntoSycamore, -}; - -pub fn error_inline<G: GenericNode>(msg: &str) -> G { - let node: G = GenericNode::element_from_tag("span"); - node.set_class_name("debug-error"); - node.update_inner_text(msg); - node -} - -// pub fn error_block<G: GenericNode>(msg: &str) -> G { -// let node: G = GenericNode::element_from_tag("p"); -// node.set_class_name("debug-error"); -// node.update_inner_text(msg); -// return node; -// } - -pub fn push_nodes<T, G>(node: &G, children: Vec<T>, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -where - G: GenericNode, - T: IntoSycamore<G>, -{ - for i in children { - node.append_child(&i.into_sycamore(cfg, ctx)) - } -} - -pub fn unwrap_inner<G: GenericNode>(node: G) -> G { - match node.first_child() { - Some(s) => s, - #[cfg(debug_assertions)] - None => panic!("Illegal HTML content"), - #[cfg(not(debug_assertions))] - None => GenericNode::marker(), - } -} - -pub fn phantom_node<G: GenericNode>(html: Result<String>) -> G { - let g: G = GenericNode::element_from_tag("Phantom"); - match html { - Ok(o) => g.dangerously_set_inner_html(&o), - #[cfg(debug_assertions)] - Err(e) => return error_inline(e.to_string().as_str()), - #[cfg(not(debug_assertions))] - Err(_) => return GenericNode::marker(), - }; - unwrap_inner(g) -} diff --git a/projects/panduck-sycamore/src/traits/blocks/code.rs b/projects/panduck-sycamore/src/traits/blocks/code.rs deleted file mode 100644 index 1d2b27a..0000000 --- a/projects/panduck-sycamore/src/traits/blocks/code.rs +++ /dev/null @@ -1,14 +0,0 @@ -use crate::shared::phantom_node; - -use super::*; - -impl<G> IntoSycamore<G> for CodeNode -where - G: GenericNode, -{ - #[cfg(feature = "server")] - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let html = cfg.code_config.syntect_config.render_html(&self); - phantom_node(html) - } -} diff --git a/projects/panduck-sycamore/src/traits/blocks/math.rs b/projects/panduck-sycamore/src/traits/blocks/math.rs deleted file mode 100644 index f0acb23..0000000 --- a/projects/panduck-sycamore/src/traits/blocks/math.rs +++ /dev/null @@ -1,26 +0,0 @@ -use notedown_ast::nodes::MathBackend; - -use crate::shared::phantom_node; - -use super::*; - -impl<G> IntoSycamore<G> for MathNode -where - G: GenericNode, -{ - #[cfg(feature = "server")] - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - match self.format { - MathBackend::LaTeX => { - let html = cfg.math_config.katex_config.render_html(&self); - phantom_node(html) - } - MathBackend::AsciiMath => { - todo!() - } - MathBackend::MathML => { - todo!() - } - } - } -} diff --git a/projects/panduck-sycamore/src/traits/blocks/mod.rs b/projects/panduck-sycamore/src/traits/blocks/mod.rs deleted file mode 100644 index 61fd05b..0000000 --- a/projects/panduck-sycamore/src/traits/blocks/mod.rs +++ /dev/null @@ -1,39 +0,0 @@ -use crate::shared::phantom_node; - -use super::*; - -mod code; -mod math; - -impl<G> IntoSycamore<G> for Delimiter -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, _: &mut SycamoreContext) -> G { - match self { - Self::HorizontalRule => GenericNode::element_from_tag("hr"), - Self::HTMLRawBlock(s) => match cfg.trust_raw_html { - true => phantom_node(Ok(s)), - false => GenericNode::marker(), - }, - } - } -} - -impl<G> IntoSycamore<G> for Header -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let node = match self.level { - 1 => GenericNode::element_from_tag("h1"), - 2 => GenericNode::element_from_tag("h2"), - 3 => GenericNode::element_from_tag("h3"), - 4 => GenericNode::element_from_tag("h4"), - 5 => GenericNode::element_from_tag("h5"), - _ => GenericNode::element_from_tag("h6"), - }; - push_nodes(&node, self.children, cfg, ctx); - return node; - } -} diff --git a/projects/panduck-sycamore/src/traits/command/mod.rs b/projects/panduck-sycamore/src/traits/command/mod.rs deleted file mode 100644 index ac9bbe5..0000000 --- a/projects/panduck-sycamore/src/traits/command/mod.rs +++ /dev/null @@ -1,25 +0,0 @@ -use notedown_ast::{command::Command, Value}; - -use super::*; - -impl<G> IntoSycamore<G> for Command -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let a: G = GenericNode::element_from_tag("cmd"); - a.update_inner_text(&format!("{:?}", self)); - return a; - } -} - -impl<G> IntoSycamore<G> for Value -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let a: G = GenericNode::element_from_tag("value"); - a.update_inner_text(&format!("{:?}", self)); - return a; - } -} diff --git a/projects/panduck-sycamore/src/traits/link.rs b/projects/panduck-sycamore/src/traits/link.rs deleted file mode 100644 index da83686..0000000 --- a/projects/panduck-sycamore/src/traits/link.rs +++ /dev/null @@ -1,111 +0,0 @@ -use notedown_ast::nodes::{EmailLink, HyperLink, ImageLink, ResourceDescriptor, SmartLink, TagReference, TwoWayLink}; - -use super::*; - -impl<G> IntoSycamore<G> for SmartLink -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - match self { - Self::EMail(v) => v.into_sycamore(cfg, ctx), - Self::Normal(v) => v.into_sycamore(cfg, ctx), - Self::Image(v) => v.into_sycamore(cfg, ctx), - Self::TwoWay(v) => v.into_sycamore(cfg, ctx), - Self::Reference(v) => v.into_sycamore(cfg, ctx), - Self::ExternalResource(v) => v.into_sycamore(cfg, ctx), - } - } -} - -impl<G> IntoSycamore<G> for ResourceDescriptor -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - // <a href="mailto:someone@example.com">Send email</a> - let a = GenericNode::element_from_tag("a"); - return a; - } -} - -impl<G> IntoSycamore<G> for EmailLink -where - G: GenericNode, -{ - /// <a href="mailto:someone@example.com">Send email</a> - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let a: G = GenericNode::element_from_tag("a"); - a.set_attribute("href", "mailto:someone@example.com"); - a.update_inner_text("mailto:someone@example.com"); - return a; - } -} - -impl<G> IntoSycamore<G> for ImageLink -where - G: GenericNode, -{ - /// - /// <a href="www.baidu.com"> - // <img border="0" src="/i/eg_buttonnext.gif" /> - // </a> - - /// - /// <img class="fit-picture" - // src="/media/cc0-images/grapefruit-slice-332-332.jpg" - // alt="Grapefruit slice atop a pile of other slices"> - - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let cfg = &cfg.image_config; - let img: G = GenericNode::element_from_tag("img"); - img.set_attribute("src", &self.source); - if let Some(s) = self.description { - img.set_attribute("alt", &s) - }; - if let true = cfg.lazy_loading { - // img.set_attribute("loading", "eager") // default, hide - img.set_attribute("loading", "lazy") - } - let link = match self.link { - None => return img, - Some(s) => { - let link: G = GenericNode::element_from_tag("a"); - link.append_child(&img); - link.set_attribute("src", &s); - link - } - }; - - return link; - } -} - -impl<G> IntoSycamore<G> for HyperLink -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let a: G = GenericNode::element_from_tag("a"); - a.set_attribute("href", &self.src); - self.text.map(|f| a.update_inner_text(&f)); - return a; - } -} - -impl<G> IntoSycamore<G> for TwoWayLink -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - todo!() - } -} -impl<G> IntoSycamore<G> for TagReference -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - todo!() - } -} diff --git a/projects/panduck-sycamore/src/traits/list/mod.rs b/projects/panduck-sycamore/src/traits/list/mod.rs deleted file mode 100644 index 0e14504..0000000 --- a/projects/panduck-sycamore/src/traits/list/mod.rs +++ /dev/null @@ -1,68 +0,0 @@ -use notedown_ast::nodes::{DetailedList, ListItem, OrderedList, OrderlessList, QuoteBlock}; - -use super::*; - -impl<G> IntoSycamore<G> for ListView -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - match self { - Self::Ordered(v) => v.into_sycamore(cfg, ctx), - Self::Orderless(v) => v.into_sycamore(cfg, ctx), - } - } -} - -impl<G> IntoSycamore<G> for OrderedList -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let item: G = GenericNode::element_from_tag("ol"); - push_nodes(&item, self.children, cfg, ctx); - return item; - } -} - -impl<G> IntoSycamore<G> for OrderlessList -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let item: G = GenericNode::element_from_tag("ul"); - push_nodes(&item, self.children, cfg, ctx); - return item; - } -} - -impl<G> IntoSycamore<G> for ListItem -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let item: G = GenericNode::element_from_tag("li"); - push_nodes(&item, self.rest, cfg, ctx); - return item; - } -} - -impl<G> IntoSycamore<G> for QuoteBlock -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let item: G = GenericNode::element_from_tag("blockquote"); - push_nodes(&item, self.body, cfg, ctx); - return item; - } -} - -impl<G> IntoSycamore<G> for DetailedList -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - todo!() - } -} diff --git a/projects/panduck-sycamore/src/traits/mod.rs b/projects/panduck-sycamore/src/traits/mod.rs deleted file mode 100644 index d666603..0000000 --- a/projects/panduck-sycamore/src/traits/mod.rs +++ /dev/null @@ -1,64 +0,0 @@ -use notedown_ast::{ - nodes::{CodeNode, Delimiter, Header, ListView, Literal, MathNode, StyleKind, StyleNode, TableView, TextSpan}, - ASTKind, -}; -use sycamore::generic_node::GenericNode; - -use crate::{ - builder::{SycamoreBuilder, SycamoreConfig, SycamoreContext}, - shared::{error_inline, push_nodes}, -}; - -mod blocks; -mod command; -mod link; -mod list; -mod table; -mod text; - -pub trait IntoSycamore<G: GenericNode> { - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G; -} - -impl<T, G> IntoSycamore<G> for Literal<T> -where - T: IntoSycamore<G>, - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - self.value.into_sycamore(cfg, ctx) - } -} - -impl<G> IntoSycamore<G> for ASTKind -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - match self { - Self::Statements(children) => { - let root: G = GenericNode::element_from_tag("div"); - root.set_class_name("notedown"); - push_nodes(&root, children, cfg, ctx); - return root; - } - Self::Paragraph(children) => { - let p = GenericNode::element_from_tag("p"); - push_nodes(&p, children, cfg, ctx); - return p; - } - Self::Header(inner) => inner.into_sycamore(cfg, ctx), - Self::Delimiter(inner) => inner.into_sycamore(cfg, ctx), - Self::TableView(inner) => inner.into_sycamore(cfg, ctx), - Self::ListView(inner) => inner.into_sycamore(cfg, ctx), - Self::QuoteNode(inner) => inner.into_sycamore(cfg, ctx), - Self::CodeNode(inner) => inner.into_sycamore(cfg, ctx), - Self::MathNode(inner) => inner.into_sycamore(cfg, ctx), - Self::LinkNode(inner) => inner.into_sycamore(cfg, ctx), - Self::TextSpan(inner) => inner.into_sycamore(cfg, ctx), - Self::StyledSpan(inner) => inner.into_sycamore(cfg, ctx), - Self::Command(inner) => inner.into_sycamore(cfg, ctx), - Self::Value(inner) => inner.into_sycamore(cfg, ctx), - } - } -} diff --git a/projects/panduck-sycamore/src/traits/table/mod.rs b/projects/panduck-sycamore/src/traits/table/mod.rs deleted file mode 100644 index 19fc8cc..0000000 --- a/projects/panduck-sycamore/src/traits/table/mod.rs +++ /dev/null @@ -1,10 +0,0 @@ -use super::*; - -impl<G> IntoSycamore<G> for TableView -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - todo!() - } -} diff --git a/projects/panduck-sycamore/src/traits/text.rs b/projects/panduck-sycamore/src/traits/text.rs deleted file mode 100644 index 43bf34b..0000000 --- a/projects/panduck-sycamore/src/traits/text.rs +++ /dev/null @@ -1,73 +0,0 @@ -use crate::shared::phantom_node; - -use super::*; - -impl<G> IntoSycamore<G> for TextSpan -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - match self { - Self::Normal(s) => GenericNode::text_node(&s), - Self::HTMLRawInline(s) => match cfg.trust_raw_html { - true => phantom_node(Ok(s)), - false => GenericNode::marker(), - }, - Self::Escaped(c) => GenericNode::text_node(c.to_string().as_str()), - Self::Emoji(c) => GenericNode::text_node(c.to_string().as_str()), - Self::SoftNewline => GenericNode::text_node("\n"), - Self::HardNewline => GenericNode::element_from_tag("br"), - Self::CheckBox(_) => { - unimplemented!() - } - Self::Empty => GenericNode::marker(), - Self::Raw(_) => { - unimplemented!() - } - } - } -} - -impl<G> IntoSycamore<G> for StyleNode -where - G: GenericNode, -{ - fn into_sycamore(self, cfg: &SycamoreConfig, ctx: &mut SycamoreContext) -> G { - let node: G = self.kind.into_sycamore(cfg, ctx); - // for i in self.children { - // node.append_child(&i.value.into_sycamore()) - // } - push_nodes(&node, self.children, cfg, ctx); - return node; - } -} - -impl<G> IntoSycamore<G> for StyleKind -where - G: GenericNode, -{ - fn into_sycamore(self, _: &SycamoreConfig, _: &mut SycamoreContext) -> G { - match self { - Self::Plain => GenericNode::element_from_tag("span"), - Self::Emphasis => GenericNode::element_from_tag("em"), - Self::Underline => GenericNode::element_from_tag("u"), - Self::Undercover => GenericNode::element_from_tag("u"), - Self::Strong => GenericNode::element_from_tag("strong"), - Self::Delete => GenericNode::element_from_tag("del"), - Self::Insert => GenericNode::element_from_tag("ins"), - Self::ItalicBold => { - unreachable!() - } - Self::Marking => { - unimplemented!() - } - Self::Color(r, g, b, a) => { - let node: G = GenericNode::element_from_tag("font"); - node.set_attribute("color", &format!("#{:X}{:X}{:X}{:X}", r, g, b, a)); - node - } - Self::Subscript => GenericNode::element_from_tag("sub"), - Self::Superscript => GenericNode::element_from_tag("sup"), - } - } -} diff --git a/projects/panduck-sycamore/tests/docx/basic.docx b/projects/panduck-sycamore/tests/docx/basic.docx deleted file mode 100644 index b7e6e96..0000000 Binary files a/projects/panduck-sycamore/tests/docx/basic.docx and /dev/null differ diff --git a/projects/panduck-sycamore/tests/docx/basic.html b/projects/panduck-sycamore/tests/docx/basic.html deleted file mode 100644 index e69de29..0000000 diff --git a/projects/panduck-sycamore/tests/docx/mod.rs b/projects/panduck-sycamore/tests/docx/mod.rs deleted file mode 100644 index 59e9c00..0000000 --- a/projects/panduck-sycamore/tests/docx/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ -// use docx_rs::read_docx; -// -// #[test] -// fn test() { -// let buf: &[u8] = include_bytes!("basic.docx"); -// let docx = read_docx(buf).unwrap(); -// println!("{:#?}", docx) -// } diff --git a/projects/panduck-sycamore/tests/docx/style.docx b/projects/panduck-sycamore/tests/docx/style.docx deleted file mode 100644 index 99223fe..0000000 Binary files a/projects/panduck-sycamore/tests/docx/style.docx and /dev/null differ diff --git a/projects/panduck-sycamore/tests/docx/style.html b/projects/panduck-sycamore/tests/docx/style.html deleted file mode 100644 index e69de29..0000000 diff --git a/projects/panduck-sycamore/tests/html/mod.rs b/projects/panduck-sycamore/tests/html/mod.rs deleted file mode 100644 index 8b13789..0000000 --- a/projects/panduck-sycamore/tests/html/mod.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/projects/panduck-sycamore/tests/jupyter/ipython.html b/projects/panduck-sycamore/tests/jupyter/ipython.html deleted file mode 100644 index d32a7a6..0000000 --- a/projects/panduck-sycamore/tests/jupyter/ipython.html +++ /dev/null @@ -1,4 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&lt;</span><span style="color:#63a35c;">img </span><span style="color:#795da3;">src</span><span style="color:#323232;">=</span><span style="color:#183691;">&quot;../images/ipython_logo.png&quot;</span><span style="color:#323232;">&gt; -</span></pre> -<p>Back to the main <a href="../Index.ipynb"></a></p><h1>IPython Kernel</h1><p>IPython provides extensions to the Python programming language that make working interactively convenient and efficient. These extensions are implemented in the IPython Kernel and are available in all of the IPython Frontends (Notebook, Terminal, Console and Qt Console) when running this kernel.</p><h2>Tutorials</h2><ul><li><p>[Cell Magics](Cell Magics.ipynb)</p></li><li><p>[Script Magics](Script Magics.ipynb)</p></li><li><p>[Rich Output](Rich Output.ipynb)</p></li><li><p>[Custom Display Logic](Custom Display Logic.ipynb)</p></li><li><p>[Plotting in the Notebook](Plotting in the Notebook.ipynb)</p></li><li><p>[Capturing Output](Capturing Output.ipynb)</p></li></ul><h2>Examples</h2><ul><li><p>[Background Jobs](Background Jobs.ipynb)</p></li><li><p>[Trapezoid Rule](Trapezoid Rule.ipynb)</p></li><li><p><a href="SymPy.ipynb"></a></p></li><li><p>[Raw Input in the Notebook](Raw Input in the Notebook.ipynb)</p></li><li><p>[Importing Notebooks](Importing Notebooks.ipynb)</p></li></ul><h2>Non-notebook examples</h2><p>This directory also contains examples that are regular Python (<code><span style="color:#323232;">.py</span></code>) files.</p><p>There are also a set of examples that show how to integrate IPython with different GUI event loops:</p></div></html> \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/jupyter/ipython.json b/projects/panduck-sycamore/tests/jupyter/ipython.json deleted file mode 100644 index 8ff7e9a..0000000 --- a/projects/panduck-sycamore/tests/jupyter/ipython.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<img src=\"../images/ipython_logo.png\">" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Back to the main [Index](../Index.ipynb)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# IPython Kernel" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "IPython provides extensions to the Python programming language that make working interactively convenient and efficient. These extensions are implemented in the IPython Kernel and are available in all of the IPython Frontends (Notebook, Terminal, Console and Qt Console) when running this kernel." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Tutorials" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "* [Cell Magics](Cell Magics.ipynb)\n", - "* [Script Magics](Script Magics.ipynb)\n", - "* [Rich Output](Rich Output.ipynb)\n", - "* [Custom Display Logic](Custom Display Logic.ipynb)\n", - "* [Plotting in the Notebook](Plotting in the Notebook.ipynb)\n", - "* [Capturing Output](Capturing Output.ipynb)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Examples" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "* [Background Jobs](Background Jobs.ipynb)\n", - "* [Trapezoid Rule](Trapezoid Rule.ipynb)\n", - "* [SymPy](SymPy.ipynb)\n", - "* [Raw Input in the Notebook](Raw Input in the Notebook.ipynb)\n", - "* [Importing Notebooks](Importing Notebooks.ipynb)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Non-notebook examples" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This directory also contains examples that are regular Python (`.py`) files." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "<a href='example-demo.py' target='_blank'>example-demo.py</a><br>" - ], - "text/plain": [ - "/Users/minrk/dev/ip/mine/examples/IPython Kernel/example-demo.py" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "<a href='ipython-get-history.py' target='_blank'>ipython-get-history.py</a><br>" - ], - "text/plain": [ - "/Users/minrk/dev/ip/mine/examples/IPython Kernel/ipython-get-history.py" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%run ../utils/list_pyfiles.ipy" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "There are also a set of examples that show how to integrate IPython with different GUI event loops:" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "data/<br>\n", - "&nbsp;&nbsp;<a href='data/flare.json' target='_blank'>flare.json</a><br>" - ], - "text/plain": [ - "data/\n", - " flare.json" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "gui/<br>\n", - "&nbsp;&nbsp;<a href='gui/gui-glut.py' target='_blank'>gui-glut.py</a><br>\n", - "&nbsp;&nbsp;<a href='gui/gui-gtk.py' target='_blank'>gui-gtk.py</a><br>\n", - "&nbsp;&nbsp;<a href='gui/gui-gtk3.py' target='_blank'>gui-gtk3.py</a><br>\n", - "&nbsp;&nbsp;<a href='gui/gui-pyglet.py' target='_blank'>gui-pyglet.py</a><br>\n", - "&nbsp;&nbsp;<a href='gui/gui-qt.py' target='_blank'>gui-qt.py</a><br>\n", - "&nbsp;&nbsp;<a href='gui/gui-tk.py' target='_blank'>gui-tk.py</a><br>\n", - "&nbsp;&nbsp;<a href='gui/gui-wx.py' target='_blank'>gui-wx.py</a><br>" - ], - "text/plain": [ - "gui/\n", - " gui-glut.py\n", - " gui-gtk.py\n", - " gui-gtk3.py\n", - " gui-pyglet.py\n", - " gui-qt.py\n", - " gui-tk.py\n", - " gui-wx.py" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%run ../utils/list_subdirs.ipy" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.4.3" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/jupyter/mod.rs b/projects/panduck-sycamore/tests/jupyter/mod.rs deleted file mode 100644 index 451a089..0000000 --- a/projects/panduck-sycamore/tests/jupyter/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -use super::*; - -pub fn html_standalone(source: &str, target: &str) -> Result<()> { - html_standalone_builder(panduck_core::convert::parse_jupyter)(source, target) -} - -#[test] -fn md_full() -> Result<()> { - html_standalone(include_str!("ipython.json"), include_str!("ipython.html"))?; - Ok(()) -} diff --git a/projects/panduck-sycamore/tests/jupyter/readme.md b/projects/panduck-sycamore/tests/jupyter/readme.md deleted file mode 100644 index e69de29..0000000 diff --git a/projects/panduck-sycamore/tests/main.rs b/projects/panduck-sycamore/tests/main.rs deleted file mode 100644 index 5d5def8..0000000 --- a/projects/panduck-sycamore/tests/main.rs +++ /dev/null @@ -1,33 +0,0 @@ -use notedown_ast::ASTNode; - -use panduck_core::Result; -use panduck_sycamore::SycamoreConfig; - -mod docx; -mod html; -mod jupyter; -mod markdown; -mod rst; - -#[test] -fn ready() { - println!("it works!") -} - -pub fn html_fragment_builder(parser: fn(&str) -> Result<ASTNode>) -> impl FnOnce(&str, &str) -> Result<()> { - move |source, target| { - let mut builder = SycamoreConfig::default().into_builder(); - let ast = parser(source)?; - assert_eq!(builder.render(ast), target); - Ok(()) - } -} - -pub fn html_standalone_builder(parser: fn(&str) -> Result<ASTNode>) -> impl FnOnce(&str, &str) -> Result<()> { - move |source, target| { - let mut builder = SycamoreConfig::default().into_builder(); - let ast = parser(source)?; - assert_eq!(builder.render_standalone(ast), target); - Ok(()) - } -} diff --git a/projects/panduck-sycamore/tests/markdown/Readme.md b/projects/panduck-sycamore/tests/markdown/Readme.md deleted file mode 100644 index 978a49c..0000000 --- a/projects/panduck-sycamore/tests/markdown/Readme.md +++ /dev/null @@ -1 +0,0 @@ -Find test at: [github/cmark-gfm/test](https://github.com/github/cmark-gfm/tree/master/test) \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/markdown/basic.html b/projects/panduck-sycamore/tests/markdown/basic.html deleted file mode 100644 index e16c10e..0000000 --- a/projects/panduck-sycamore/tests/markdown/basic.html +++ /dev/null @@ -1,110 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><h1>markdown-mode Test Cases</h1><h2>1. Lists</h2><p>Unordered lists:</p><ul><li><p>This is a bullet point.</p><ul><li><p>This is a sub bullet point.</p></li></ul></li><li><p>This is another bullet point.</p></li></ul><p>Ordered lists:</p><ol><li><p>This is an ordered list</p></li><li><p>With a second element.</p></li><li><p>And a forty-fourth element.</p></li><li><p>Remember, Markdown doesn’t care which number you use.</p></li></ol><p>List items with bold and italic:</p><blockquote><ul><li><p>This is a list item <em>in italics</em>, just a test.</p></li><li><p><em>List item in italics.</em></p></li><li><p>This is a list item <strong>in bold</strong>, just a test.</p></li><li><p><strong>List item in bold.</strong></p></li></ul></blockquote><p>Bold and italic phrases at the beginning of lines:</p><p><em>not a list</em> -<strong>also not a list</strong></p><h2>2. Blockquotes</h2><blockquote><p>this is a test -of the blockquote mechanism</p></blockquote><h2>3. Two Inline Links on One Line</h2><p><em>Contributed by Ryan Barrett on 2007-07-02</em></p><p>thanks! the new version 1.4 works great. very cool.</p><p>i did notice a minor bug. if there are two inline links in the same line, e.g. -<a href="bar"></a> baz <a href="bar"></a>, it colors the text between the links (baz) as well.</p><p>i’m guessing this is because the inline link regexp is greedy. if you switch -it to non-greedy - if elisp can do that - or to something like ‘[<a href="http://jblevins.org/">And this is a valid reference definition!</a>]+]’ if -not, that might do the trick.</p><h2>4. Empty Inline Links</h2><p><a href=""></a> -<a href="asdf"></a> -<a href=""></a></p><h2>5. Bold and Italics on the Same Line</h2><p><em>Contributed by Conal Elliott on 2007-08-27</em></p><p>By the way, here are two syntax-highlighting glitches I’ve seen so far:</p><p><strong>foo and doo</strong> or <em>ziddle zop</em> -Oh – what’s happening here?</p><h2>6. Reverse Order Italic then Bold</h2><p>Why doesn’t the bold part get picked up? -<em>ziddle zop</em> or <strong>foo and doo</strong></p><h2>7. Two Inline Links in One Line</h2><p><em>Contributed by Alastair Rankine on 2007-09-10</em></p><p>Thanks for this, I have been waiting for an emacs markdown mode for ages!</p><p>One minor quibble is in the highlighting of inline links. As currently -(1.4) implemented the presence of a close paren on the same line as an -inline link will highlight the link and the subsequent text:</p><p>[blah](this bit will be highlighted) and so (will this bit)</p><p>I think this is because of greedy regexes. Here is a simple patch to address.</p><h2>8. Reference-Style Link with a Space</h2><p>Here’s a [link] <a href="http://daringfireball.net/projects/markdown/syntax"></a> with a space between the components.</p><h2>9. Inline Code</h2><p>Single <code><span style="color:#323232;">backtick code</span></code> fragments as well as <code><span style="color:#323232;">double`backtick</span></code> fragments are -supported.</p><h2>10. Single Underscore and Asterisk</h2><p>This is a _ single underscore and a * single asterisk. -They should not trigger font locking.</p><h2>11. Double Underscores and Asterisks</h2><p>Neither should a double **asterisk and double__ underscore!</p><h2>12. List-Like Strings in Preformatted Text</h2><p>To make lists look nice, you can wrap items with hanging indents:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. -</span><span style="color:#323232;"> Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, -</span><span style="color:#323232;"> viverra nec, fringilla in, laoreet vitae, risus. -</span><span style="color:#323232;">* Donec sit amet nisl. Aliquam semper ipsum sit amet velit. -</span><span style="color:#323232;"> Suspendisse id sem consectetuer libero luctus adipiscing. -</span></pre> -<h2>13. Multi-Line Italic and Bold</h2><p>bold <strong>phrase spanning -two lines</strong> asdf <strong>same line</strong> test</p><p>italic <em>phrase spanning -two lines</em> italic <em>same line</em> test</p><h2>14. Reference Links</h2><p>This document was created in GNU Emacs using <a href="http://jrblevin.freeshell.org/software/markdown-mode"></a>. It provides -syntax highlighting for <a href="http://daringfireball.net/projects/markdown">Markdown Homepage</a> documents which allows reference-style -links like these. The reference definitions can even contain alternate -text such as <a href="http://reference-link.com/with/alt">Alternate Text</a>.</p><h2>15. Escaping</h2><p>ab *literal asterisks* asdf <em>inside * literal asterisks</em> asd lkj</p><p>ab *<em>this should be italic*</em> yz<br/>ab *<em>this should be italic</em>* yz<br/>ab <em>*this should be italic*</em> yz<br/>ab <em>*this should be italic</em>* yz</p><h2>16. Single Letter and Word on Same Line</h2><p>a single <strong>a</strong> bold letter and bold word <strong>test</strong> asdf<br/>a single <em>a</em> italic letter and italic word <em>test</em> asdf<br/>a single <strong>a</strong> bold letter and bold word <strong>test</strong> asdf<br/>a single <em>a</em> italic letter italic word <em>test</em> asdf</p><h2>17. Hanging Indents</h2><ul><li><p>An exclamation mark: <code><span style="color:#323232;">!</span></code>;</p></li><li><p>followed by a set of square brackets, containing the <code><span style="color:#323232;">alt</span></code> -attribute text for the image;</p></li></ul><h2>18. Links in Preformatted Text</h2><p>Here’s an example of reference links in action:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">This document was created in GNU Emacs using [markdown-mode][]. It -</span><span style="color:#323232;">provides syntax highlighting for [Markdown][] documents which allows -</span><span style="color:#323232;">reference-style links like these. The reference definitions can even -</span><span style="color:#323232;">contain alternate text such as [this one][id]. -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> [markdown-mode]: http://jrblevin.freeshell.org/software/markdown-mode -</span><span style="color:#323232;"> [Markdown]: http://daringfireball.net/projects/markdown -</span><span style="color:#323232;"> [id]: http://reference-link.com/with/alt &quot;Alternate Text&quot; -</span></pre> -<h2>19. Slash-Star in Preformatted Text</h2><pre style="background-color:#ffffff;"> -<span style="color:#323232;">svn commit -m &quot;Imported RCS project&quot; -</span><span style="color:#323232;">svn add image.png binaries/* -</span><span style="color:#323232;">svn commit -m &quot;Imported additional project files&quot; -</span></pre> -<p>This text gets counted as part of the block quote too. But it can be ended -by a star-slash: */ It is as if <code><span style="color:#323232;">markdown-mode</span></code> is using C++ style comments.</p><p>Fixed by commit d81138d.</p><h2>20. Underscores in Code Blocks</h2><p><em>Contributed by shindo on 2008-01-20</em></p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">get_something_by_name() -</span></pre> -<h2>21. Escaped Characters</h2><p>Escaped backticks: `not code`</p><p>Escaped underscores: don’t_italicize_this</p><p>Escaped asterisks: *also not italic*</p><p>Escaped hash marks:<br/># This is not a heading</p><h2>22. Adjacent Wiki Links</h2><p>[[Two]] [[WikiLinks]] [[InARow]]</p><h2>23. SmartyPants</h2><p>This is a test of “SmartyPants,” a progrm written by John Gruber for -generating typographically correct HTML entities–ones such as -the em-dash and ellipsis…</p><h2>24. Horizontal Rules</h2><hr/><hr/><hr/><h2>25. Asterisks and Underscores Across Blocks</h2><p>Asterisks *should</p><p>not match across* block boundaries.</p><p>Underscores _should</p><p>not match across_ block boundaries.</p><p>Double Asterisks **should</p><p>not match across** block boundaries.</p><p>Double underscores __should</p><p>not match across__ block boundaries.</p><p>But, <em>this should still match</em>.</p><p>So should <em>this</em>.</p><p>Addressed by commit d81138d.</p><h2>26. Underscores Within Words</h2><p>Code fragments <code><span style="color:#323232;">can_have_underscores_inside_like</span></code> this.</p><h2>27. Code Blocks Spanning Lines</h2><p>Markdown allows <code><span style="color:#323232;">code fragments</span></code> to span across lines.</p><p>Let’s make sure that <code><span style="color:#323232;">double` backtick`code fragments</span></code> work -this way too.</p><p>However, they should `not</p><p>match` across blocks.</p><p>Here’s another <code><span style="color:#323232;">valid</span></code> one.</p><h2>28. Pre Blocks and Nested Lists</h2><ul><li><p>List level 1 item 1</p></li><li><p>List level 1 item 2</p><p>This is a second paragraph, part of item 2.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">This nested pre block should match -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> So should this -</span></pre> -<p>Now we move back to the list.</p></li><li><p>List level 1 item 3</p><ul><li><p>List level 2 item 1</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Nested pre block -</span></pre> -</li><li><p>List level 2 item 2</p><ul><li><p>List level 3 item 1</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Nested pre block -</span></pre> -</li></ul></li></ul></li></ul><h2>29. Colon After Wiki Link</h2><p>[[AnotherLink]]:note</p><h2>30. Incorrect Parsing of List Paragraph</h2><p><em>Contributed by Luciano Gerber <a href="mailto:garopaba_uk@yahoo.co.uk"></a> on April 4, 2012.</em></p><p>It is interesting to see what happens when one queries -<code><span style="color:#323232;">social upheaval</span></code> and <code><span style="color:#323232;">protopalatial era</span></code>.</p><ul><li><p><code><span style="color:#323232;">social upheaval</span></code>: the following queries have been tried:</p><p>social upheaval subClassOf</p></li></ul><p>The preceding text should not be matched as a preformatted block.</p><h2>31. Footnotes</h2><p>This is a footnote marker,[^1] but this is not.<a href="http://jblevins.org/">And this is a valid reference definition!</a></p><h2>32. Carat as Implicit Reference Link</h2><p>This is a valid markdown link: <a href="http://jblevins.org/">And this is a valid reference definition!</a></p><h2>33. Email Address Inside Bold and Italic Spans</h2><p><em>Lorem <a href="mailto:ipsum@dolor.sit"></a> amet.</em></p><p><strong>Lorem <a href="mailto:ipsum@dolor.sit"></a> amet.</strong></p><h2>34. URL Inside Bold and Italic Spans</h2><p><em>markdown-mode homepage <a href="http://jblevins.org/projects/markdown-mode/"></a></em></p><p><strong>markdown-mode homepage <a href="http://jblevins.org/projects/markdown-mode/"></a></strong></p><h2>35. Complex Preformatted Code Block</h2><pre style="background-color:#ffffff;"> -<span style="color:#323232;">class Employee &lt; ActiveRecord::Base -</span><span style="color:#323232;"> attr_accessible :github_username, :name -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> def self.syncify! -</span><span style="color:#323232;"> begin -</span><span style="color:#323232;"> employee_sync = GitOrganized::GithubEmployeeSync.new( -</span><span style="color:#323232;"> GitOrganized::Organization.new( -</span><span style="color:#323232;"> GitOrganized.config.default_org, -</span><span style="color:#323232;"> [&quot;employees-pull&quot;, &quot;employees-push&quot;] -</span><span style="color:#323232;"> ), -</span><span style="color:#323232;"> Sources.new -</span><span style="color:#323232;"> ) -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> employee_sync.sync -</span><span style="color:#323232;"> rescue Github::Error::ServiceError =&gt; e -</span><span style="color:#323232;"> retry -</span><span style="color:#323232;"> end -</span><span style="color:#323232;"> end -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> after_save do |employee| Employee.syncify! end -</span><span style="color:#323232;"> after_destroy do |employee| Employee.syncify! end -</span><span style="color:#323232;">end -</span></pre> -<h2>36. Fenced Code Blocks</h2><p>Fenced code blocks begin with three or more tildes and end with a line -with at least as many tildes.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">program hello -</span><span style="color:#323232;"> implicit none -</span><span style="color:#323232;"> print &#39;(a)&#39;, &#39;Hello, world!&#39; -</span><span style="color:#323232;">end program hello -</span></pre> -<p>They may also have a <code><span style="color:#323232;">lang</span></code> attribute.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">program hello -</span><span style="color:#323232;"> implicit none -</span><span style="color:#323232;"> print &#39;(a)&#39;, &#39;Hello, world!&#39; -</span><span style="color:#323232;">end program hello -</span></pre> -<p>In Kramdown, one specifies the language identifier as follows:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">program hello -</span><span style="color:#323232;"> implicit none -</span><span style="color:#323232;"> print &#39;(a)&#39;, &#39;Hello, world!&#39; -</span><span style="color:#323232;">end program hello -</span></pre> -<p>or with a Maruku-style inline attribute list</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">program hello -</span><span style="color:#323232;"> implicit none -</span><span style="color:#323232;"> print &#39;(a)&#39;, &#39;Hello, world!&#39; -</span><span style="color:#323232;">end program hello -</span></pre> -<p>{: .language-fortran}</p></div></html> \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/markdown/basic.md b/projects/panduck-sycamore/tests/markdown/basic.md deleted file mode 100644 index 40b48da..0000000 --- a/projects/panduck-sycamore/tests/markdown/basic.md +++ /dev/null @@ -1,420 +0,0 @@ -markdown-mode Test Cases -======================== - -## 1. Lists - -Unordered lists: - -- This is a bullet point. - - This is a sub bullet point. -- This is another bullet point. - -Ordered lists: - -1. This is an ordered list -2. With a second element. -44. And a forty-fourth element. -3. Remember, Markdown doesn't care which number you use. - -List items with bold and italic: - -> * This is a list item *in italics*, just a test. -> * *List item in italics.* -> * This is a list item **in bold**, just a test. -> * **List item in bold.** - -Bold and italic phrases at the beginning of lines: - -*not a list* -**also not a list** - - -## 2. Blockquotes - - -> this is a test -> of the blockquote mechanism - - -## 3. Two Inline Links on One Line - - -*Contributed by Ryan Barrett on 2007-07-02* - -thanks! the new version 1.4 works great. very cool. - -i did notice a minor bug. if there are two inline links in the same line, e.g. -[foo](bar) baz [foo](bar), it colors the text between the links (baz) as well. - -i'm guessing this is because the inline link regexp is greedy. if you switch -it to non-greedy - if elisp can do that - or to something like '\[[^]]+\]' if -not, that might do the trick. - - -## 4. Empty Inline Links - -[]() -[](asdf) -[asdf]() - - -## 5. Bold and Italics on the Same Line - -*Contributed by Conal Elliott on 2007-08-27* - -By the way, here are two syntax-highlighting glitches I've seen so far: - -**foo and doo** or *ziddle zop* -Oh -- what's happening here? - - -## 6. Reverse Order Italic then Bold - -Why doesn't the bold part get picked up? -*ziddle zop* or **foo and doo** - - -## 7. Two Inline Links in One Line - -*Contributed by Alastair Rankine on 2007-09-10* - -Thanks for this, I have been waiting for an emacs markdown mode for ages! - -One minor quibble is in the highlighting of inline links. As currently -(1.4) implemented the presence of a close paren on the same line as an -inline link will highlight the link and the subsequent text: - - [blah](this bit will be highlighted) and so (will this bit) - -I think this is because of greedy regexes. Here is a simple patch to address. - - -## 8. Reference-Style Link with a Space - -Here's a [link] [1] with a space between the components. - - [1]: http://daringfireball.net/projects/markdown/syntax - - -## 9. Inline Code - -Single `backtick code` fragments as well as ``double`backtick`` fragments are -supported. - - -## 10. Single Underscore and Asterisk - -This is a _ single underscore and a * single asterisk. -They should not trigger font locking. - - -## 11. Double Underscores and Asterisks - -Neither should a double **asterisk and double__ underscore! - -## 12. List-Like Strings in Preformatted Text - -To make lists look nice, you can wrap items with hanging indents: - - * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. - Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, - viverra nec, fringilla in, laoreet vitae, risus. - * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. - Suspendisse id sem consectetuer libero luctus adipiscing. - -## 13. Multi-Line Italic and Bold - -bold **phrase spanning -two lines** asdf **same line** test - -italic *phrase spanning -two lines* italic *same line* test - - -## 14. Reference Links - -This document was created in GNU Emacs using [markdown-mode][]. It provides -syntax highlighting for [Markdown][] documents which allows reference-style -links like these. The reference definitions can even contain alternate -text such as [this one][id]. - - [markdown-mode]: http://jrblevin.freeshell.org/software/markdown-mode - [Markdown]: http://daringfireball.net/projects/markdown "Markdown Homepage" - [id]: http://reference-link.com/with/alt "Alternate Text" - - -## 15. Escaping - -ab \*literal asterisks\* asdf *inside \* literal asterisks* asd lkj - -ab \**this should be italic\** yz -ab \**this should be italic*\* yz -ab *\*this should be italic\** yz -ab *\*this should be italic*\* yz - - -## 16. Single Letter and Word on Same Line - -a single **a** bold letter and bold word **test** asdf -a single _a_ italic letter and italic word _test_ asdf -a single __a__ bold letter and bold word __test__ asdf -a single *a* italic letter italic word *test* asdf - - -## 17. Hanging Indents - -* An exclamation mark: `!`; -* followed by a set of square brackets, containing the `alt` - attribute text for the image; - - -## 18. Links in Preformatted Text - -Here's an example of reference links in action: - - This document was created in GNU Emacs using [markdown-mode][]. It - provides syntax highlighting for [Markdown][] documents which allows - reference-style links like these. The reference definitions can even - contain alternate text such as [this one][id]. - - [markdown-mode]: http://jrblevin.freeshell.org/software/markdown-mode - [Markdown]: http://daringfireball.net/projects/markdown - [id]: http://reference-link.com/with/alt "Alternate Text" - - -## 19. Slash-Star in Preformatted Text - - svn commit -m "Imported RCS project" - svn add image.png binaries/* - svn commit -m "Imported additional project files" - -This text gets counted as part of the block quote too. But it can be ended -by a star-slash: */ It is as if `markdown-mode` is using C++ style comments. - -Fixed by commit d81138d. - - -## 20. Underscores in Code Blocks - -*Contributed by shindo on 2008-01-20* - - get_something_by_name() - - -## 21. Escaped Characters - -Escaped backticks: \`not code\` - -Escaped underscores: don't\_italicize\_this - -Escaped asterisks: \*also not italic\* - -Escaped hash marks: -\# This is not a heading - - -## 22. Adjacent Wiki Links - -[[Two]] [[WikiLinks]] [[InARow]] - - -## 23. SmartyPants - -This is a test of "SmartyPants," a progrm written by John Gruber for -generating typographically correct HTML entities--ones such as -the em-dash and ellipsis... - - -## 24. Horizontal Rules - -* * * * * - -- - - --- - - - - -* *** * * *** * * * - - -## 25. Asterisks and Underscores Across Blocks - -Asterisks *should - -not match across* block boundaries. - -Underscores _should - -not match across_ block boundaries. - -Double Asterisks **should - -not match across** block boundaries. - -Double underscores __should - -not match across__ block boundaries. - -But, *this should still match*. - -So should _this_. - -Addressed by commit d81138d. - - -## 26. Underscores Within Words - -Code fragments `can_have_underscores_inside_like` this. - - -## 27. Code Blocks Spanning Lines - -Markdown allows `code -fragments` to span across lines. - -Let's make sure that ``double` -backtick`code fragments`` work -this way too. - -However, they should `not - -match` across blocks. - -Here's another `valid` one. - - -## 28. Pre Blocks and Nested Lists - - - List level 1 item 1 - - List level 1 item 2 - - This is a second paragraph, part of item 2. - - This nested pre block should match - - So should this - - Now we move back to the list. - - - List level 1 item 3 - - - List level 2 item 1 - - Nested pre block - - - List level 2 item 2 - - - List level 3 item 1 - - Nested pre block - - -## 29. Colon After Wiki Link - -[[AnotherLink]]:note - - -## 30. Incorrect Parsing of List Paragraph - -*Contributed by Luciano Gerber <garopaba_uk@yahoo.co.uk> on April 4, 2012.* - -It is interesting to see what happens when one queries -`social upheaval` and `protopalatial era`. - -* `social upheaval`: the following queries have been tried: - - social upheaval subClassOf - -The preceding text should not be matched as a preformatted block. - - -## 31. Footnotes - -This is a footnote marker,[^1] but this is not.[^] - -[^1]: And the definition of the footnote is here. - - [^2]: but this is preformatted text. - - -## 32. Carat as Implicit Reference Link - -This is a valid markdown link: [^][] - -[^]: http://jblevins.org/ "And this is a valid reference definition!" - - -## 33. Email Address Inside Bold and Italic Spans - -*Lorem <ipsum@dolor.sit> amet.* - -**Lorem <ipsum@dolor.sit> amet.** - - -## 34. URL Inside Bold and Italic Spans - -*markdown-mode homepage http://jblevins.org/projects/markdown-mode/* - -**markdown-mode homepage http://jblevins.org/projects/markdown-mode/** - -## 35. Complex Preformatted Code Block - - class Employee < ActiveRecord::Base - attr_accessible :github_username, :name - - def self.syncify! - begin - employee_sync = GitOrganized::GithubEmployeeSync.new( - GitOrganized::Organization.new( - GitOrganized.config.default_org, - ["employees-pull", "employees-push"] - ), - Sources.new - ) - - employee_sync.sync - rescue Github::Error::ServiceError => e - retry - end - end - - after_save do |employee| Employee.syncify! end - after_destroy do |employee| Employee.syncify! end - end - -## 36. Fenced Code Blocks - -Fenced code blocks begin with three or more tildes and end with a line -with at least as many tildes. - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -program hello - implicit none - print '(a)', 'Hello, world!' -end program hello -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -They may also have a `lang` attribute. - -~~~~~~~~~~~~~{: lang=fortran } -program hello - implicit none - print '(a)', 'Hello, world!' -end program hello -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In Kramdown, one specifies the language identifier as follows: - -~~~ fortran -program hello - implicit none - print '(a)', 'Hello, world!' -end program hello -~~~ - -or with a Maruku-style inline attribute list - -~~~ -program hello - implicit none - print '(a)', 'Hello, world!' -end program hello -~~~ -{: .language-fortran} \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/markdown/extensions.html b/projects/panduck-sycamore/tests/markdown/extensions.html deleted file mode 100644 index 705be68..0000000 --- a/projects/panduck-sycamore/tests/markdown/extensions.html +++ /dev/null @@ -1,797 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><hr/><p>title: Extensions test -author: Yuki Izumi -version: 0.1 -date: ‘2016-08-31’ -license: ‘<a href="http://creativecommons.org/licenses/by-sa/4.0/"></a>’ -…</p><h2>Tables</h2><p>Here’s a well-formed table, doing everything it should.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| abc | def | -</span><span style="color:#323232;">| --- | --- | -</span><span style="color:#323232;">| ghi | jkl | -</span><span style="color:#323232;">| mno | pqr | -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;abc&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;def&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;ghi&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;jkl&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;mno&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;pqr&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<p>We’re going to mix up the table now; we’ll demonstrate that inline formatting -works fine, but block elements don’t. You can also have empty cells, and the -textual alignment of the columns is shown to be irrelevant.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Hello! -</span><span style="color:#323232;"> -</span><span style="color:#323232;">| _abc_ | セン | -</span><span style="color:#323232;">| ----- | ---- | -</span><span style="color:#323232;">| 1. Block elements inside cells don&#39;t work. | | -</span><span style="color:#323232;">| But _**inline elements do**_. | x | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Hi! -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Hello!&lt;/p&gt; -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;&lt;em&gt;abc&lt;/em&gt;&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;セン&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;1. Block elements inside cells don&#39;t work.&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;But &lt;em&gt;&lt;strong&gt;inline elements do&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;x&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span><span style="color:#323232;">&lt;p&gt;Hi!&lt;/p&gt; -</span></pre> -<p>Here we demonstrate some edge cases about what is and isn’t a table.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| Not enough table | to be considered table | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">| Not enough table | to be considered table | -</span><span style="color:#323232;">| Not enough table | to be considered table | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">| Just enough table | to be considered table | -</span><span style="color:#323232;">| ----------------- | ---------------------- | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">| ---- | --- | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">|x| -</span><span style="color:#323232;">|-| -</span><span style="color:#323232;"> -</span><span style="color:#323232;">| xyz | -</span><span style="color:#323232;">| --- | -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;| Not enough table | to be considered table |&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;| Not enough table | to be considered table | -</span><span style="color:#323232;">| Not enough table | to be considered table |&lt;/p&gt; -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;Just enough table&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;to be considered table&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span><span style="color:#323232;">&lt;p&gt;| ---- | --- |&lt;/p&gt; -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;x&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;xyz&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<p>A “simpler” table, GFM style:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">abc | def -</span><span style="color:#323232;">--- | --- -</span><span style="color:#323232;">xyz | ghi -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;abc&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;def&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;xyz&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;ghi&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<p>We are making the parser slighly more lax here. Here is a table with spaces at -the end:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Hello! -</span><span style="color:#323232;"> -</span><span style="color:#323232;">| _abc_ | セン | -</span><span style="color:#323232;">| ----- | ---- | -</span><span style="color:#323232;">| this row has a space at the end | | -</span><span style="color:#323232;">| But _**inline elements do**_. | x | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Hi! -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Hello!&lt;/p&gt; -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;&lt;em&gt;abc&lt;/em&gt;&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;セン&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;this row has a space at the end&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;But &lt;em&gt;&lt;strong&gt;inline elements do&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;x&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span><span style="color:#323232;">&lt;p&gt;Hi!&lt;/p&gt; -</span></pre> -<p>Table alignment:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">aaa | bbb | ccc | ddd | eee -</span><span style="color:#323232;">:-- | --- | :-: | --- | --: -</span><span style="color:#323232;">fff | ggg | hhh | iii | jjj -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th align=&quot;left&quot;&gt;aaa&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;bbb&lt;/th&gt; -</span><span style="color:#323232;">&lt;th align=&quot;center&quot;&gt;ccc&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;ddd&lt;/th&gt; -</span><span style="color:#323232;">&lt;th align=&quot;right&quot;&gt;eee&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td align=&quot;left&quot;&gt;fff&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;ggg&lt;/td&gt; -</span><span style="color:#323232;">&lt;td align=&quot;center&quot;&gt;hhh&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;iii&lt;/td&gt; -</span><span style="color:#323232;">&lt;td align=&quot;right&quot;&gt;jjj&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<h3>Table cell count mismatches</h3><p>The header and marker row must match.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| a | b | c | -</span><span style="color:#323232;">| --- | --- | -</span><span style="color:#323232;">| this | isn&#39;t | okay | -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;| a | b | c | -</span><span style="color:#323232;">| --- | --- | -</span><span style="color:#323232;">| this | isn&#39;t | okay |&lt;/p&gt; -</span></pre> -<p>But any of the body rows can be shorter. Rows longer -than the header are truncated.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| a | b | c | -</span><span style="color:#323232;">| --- | --- | --- -</span><span style="color:#323232;">| x -</span><span style="color:#323232;">| a | b -</span><span style="color:#323232;">| 1 | 2 | 3 | 4 | 5 | -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;a&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;b&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;c&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;x&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;a&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;b&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;1&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;2&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;3&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<h3>Embedded pipes</h3><p>Tables with embedded pipes could be tricky.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| a | b | -</span><span style="color:#323232;">| --- | --- | -</span><span style="color:#323232;">| Escaped pipes are \|okay\|. | Like \| this. | -</span><span style="color:#323232;">| Within `\|code\| is okay` too. | -</span><span style="color:#323232;">| _**`c\|`**_ \| complex -</span><span style="color:#323232;">| don&#39;t **\_reparse\_** -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;a&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;b&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;Escaped pipes are |okay|.&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;Like | this.&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;Within &lt;code&gt;|code| is okay&lt;/code&gt; too.&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;c|&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt; | complex&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;don&#39;t &lt;strong&gt;_reparse_&lt;/strong&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<h3>Oddly-formatted markers</h3><p>This shouldn’t assert.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| a | -</span><span style="color:#323232;">--- | -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;a&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<h3>Escaping</h3><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| a | b | -</span><span style="color:#323232;">| --- | --- | -</span><span style="color:#323232;">| \\ | `\\` | -</span><span style="color:#323232;">| \\\\ | `\\\\` | -</span><span style="color:#323232;">| \_ | `\_` | -</span><span style="color:#323232;">| \| | `\|` | -</span><span style="color:#323232;">| \a | `\a` | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">\\ `\\` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">\\\\ `\\\\` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">\_ `\_` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">\| `\|` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">\a `\a` -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;a&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;b&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;\&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;code&gt;\\&lt;/code&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;\\&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;code&gt;\\\\&lt;/code&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;_&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;code&gt;\_&lt;/code&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;|&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;code&gt;|&lt;/code&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;\a&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;code&gt;\a&lt;/code&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span><span style="color:#323232;">&lt;p&gt;\ &lt;code&gt;\\&lt;/code&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;\\ &lt;code&gt;\\\\&lt;/code&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;_ &lt;code&gt;\_&lt;/code&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;| &lt;code&gt;\|&lt;/code&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;\a &lt;code&gt;\a&lt;/code&gt;&lt;/p&gt; -</span></pre> -<h3>Embedded HTML</h3><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| a | -</span><span style="color:#323232;">| --- | -</span><span style="color:#323232;">| &lt;strong&gt;hello&lt;/strong&gt; | -</span><span style="color:#323232;">| ok &lt;br&gt; sure | -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;a&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;strong&gt;hello&lt;/strong&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;ok &lt;br&gt; sure&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<h3>Reference-style links</h3><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Here&#39;s a link to [Freedom Planet 2][]. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">| Here&#39;s a link to [Freedom Planet 2][] in a table header. | -</span><span style="color:#323232;">| --- | -</span><span style="color:#323232;">| Here&#39;s a link to [Freedom Planet 2][] in a table row. | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[Freedom Planet 2]: http://www.freedomplanet2.com/ -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Here&#39;s a link to &lt;a href=&quot;http://www.freedomplanet2.com/&quot;&gt;Freedom Planet 2&lt;/a&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;Here&#39;s a link to &lt;a href=&quot;http://www.freedomplanet2.com/&quot;&gt;Freedom Planet 2&lt;/a&gt; in a table header.&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;Here&#39;s a link to &lt;a href=&quot;http://www.freedomplanet2.com/&quot;&gt;Freedom Planet 2&lt;/a&gt; in a table row.&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<h3>Sequential cells</h3><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| a | b | c | -</span><span style="color:#323232;">| --- | --- | --- | -</span><span style="color:#323232;">| d || e | -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;a&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;b&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;c&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;d&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;e&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<h3>Interaction with emphasis</h3><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| a | b | -</span><span style="color:#323232;">| --- | --- | -</span><span style="color:#323232;">|***(a)***| -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;a&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;b&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;em&gt;&lt;strong&gt;(a)&lt;/strong&gt;&lt;/em&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<h3>a table can be recognised when separated from a paragraph of text without an empty line</h3><pre style="background-color:#ffffff;"> -<span style="color:#323232;">123 -</span><span style="color:#323232;">456 -</span><span style="color:#323232;">| a | b | -</span><span style="color:#323232;">| ---| --- | -</span><span style="color:#323232;">d | e -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;123 -</span><span style="color:#323232;">456&lt;/p&gt; -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;a&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;b&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;d&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;e&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span></pre> -<h2>Strikethroughs</h2><p>A well-formed strikethrough.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">A proper ~strikethrough~. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;A proper &lt;del&gt;strikethrough&lt;/del&gt;.&lt;/p&gt; -</span></pre> -<p>Some strikethrough edge cases.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">These are ~not strikethroughs. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">No, they are not~ -</span><span style="color:#323232;"> -</span><span style="color:#323232;">This ~is ~ legit~ isn&#39;t ~ legit. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">This is not ~~~~~one~~~~~ huge strikethrough. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">~one~ ~~two~~ ~~~three~~~ -</span><span style="color:#323232;"> -</span><span style="color:#323232;">No ~mismatch~~ -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;These are ~not strikethroughs.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;No, they are not~&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;This &lt;del&gt;is ~ legit&lt;/del&gt; isn&#39;t ~ legit.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;This is not ~~~~~one~~~~~ huge strikethrough.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;del&gt;one&lt;/del&gt; &lt;del&gt;two&lt;/del&gt; ~~~three~~~&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;No ~mismatch~~&lt;/p&gt; -</span></pre> -<p>Using 200 tilde since it overflows the internal buffer -size (100) for parsing delimiters in inlines.c</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;"> -</span><span style="color:#323232;">## Autolinks -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">: http://google.com https://google.com -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;http://google.com/å&gt; http://google.com/å -</span><span style="color:#323232;"> -</span><span style="color:#323232;">scyther@pokemon.com -</span><span style="color:#323232;"> -</span><span style="color:#323232;">www.github.com www.github.com/á -</span><span style="color:#323232;"> -</span><span style="color:#323232;">www.google.com/a_b -</span><span style="color:#323232;"> -</span><span style="color:#323232;">**Autolink and http://inlines** -</span><span style="color:#323232;"> -</span><span style="color:#323232;">![http://inline.com/image](http://inline.com/image) -</span><span style="color:#323232;"> -</span><span style="color:#323232;">a.w@b.c -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Full stop outside parens shouldn&#39;t be included http://google.com/ok. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">(Full stop inside parens shouldn&#39;t be included http://google.com/ok.) -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&quot;http://google.com&quot; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&#39;http://google.com&#39; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">http://🍄.ga/ http://x🍄.ga/ -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;: &lt;a href=&quot;http://google.com&quot;&gt;http://google.com&lt;/a&gt; &lt;a href=&quot;https://google.com&quot;&gt;https://google.com&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;a href=&quot;http://google.com/%C3%A5&quot;&gt;http://google.com/å&lt;/a&gt; &lt;a href=&quot;http://google.com/%C3%A5&quot;&gt;http://google.com/å&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;a href=&quot;mailto:scyther@pokemon.com&quot;&gt;scyther@pokemon.com&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;a href=&quot;http://www.github.com&quot;&gt;www.github.com&lt;/a&gt; &lt;a href=&quot;http://www.github.com/%C3%A1&quot;&gt;www.github.com/á&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;a href=&quot;http://www.google.com/a_b&quot;&gt;www.google.com/a_b&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;strong&gt;Autolink and &lt;a href=&quot;http://inlines&quot;&gt;http://inlines&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;img src=&quot;http://inline.com/image&quot; alt=&quot;http://inline.com/image&quot; /&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;a href=&quot;mailto:a.w@b.c&quot;&gt;a.w@b.c&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;Full stop outside parens shouldn&#39;t be included &lt;a href=&quot;http://google.com/ok&quot;&gt;http://google.com/ok&lt;/a&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;(Full stop inside parens shouldn&#39;t be included &lt;a href=&quot;http://google.com/ok&quot;&gt;http://google.com/ok&lt;/a&gt;.)&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&amp;quot;&lt;a href=&quot;http://google.com&quot;&gt;http://google.com&lt;/a&gt;&amp;quot;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&#39;&lt;a href=&quot;http://google.com&quot;&gt;http://google.com&lt;/a&gt;&#39;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;a href=&quot;http://%F0%9F%8D%84.ga/&quot;&gt;http://🍄.ga/&lt;/a&gt; &lt;a href=&quot;http://x%F0%9F%8D%84.ga/&quot;&gt;http://x🍄.ga/&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">This shouldn&#39;t crash everything: (_A_@_.A -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;IGNORE&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">These should not link: -</span><span style="color:#323232;"> -</span><span style="color:#323232;">* @a.b.c@. x -</span><span style="color:#323232;">* n@. b -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;These should not link:&lt;/p&gt; -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;@a.b.c@. x&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;n@. b&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">## HTML tag filter -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">This is &lt;xmp&gt; not okay, but **this** &lt;strong&gt;is&lt;/strong&gt;. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;p&gt;This is &lt;xmp&gt; not okay, but **this** &lt;strong&gt;is&lt;/strong&gt;.&lt;/p&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Nope, I won&#39;t have &lt;textarea&gt;. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;p&gt;No &lt;textarea&gt; here either.&lt;/p&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;p&gt;This &lt;random /&gt; &lt;thing&gt; is okay&lt;/thing&gt; though.&lt;/p&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Yep, &lt;totally&gt;okay&lt;/totally&gt;. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;!-- HTML comments are okay, though. --&gt; -</span><span style="color:#323232;">&lt;!- But we&#39;re strict. -&gt; -</span><span style="color:#323232;">&lt;! No nonsense. &gt; -</span><span style="color:#323232;">&lt;!-- Leave multiline comments the heck alone, though, okay? -</span><span style="color:#323232;">Even with {&quot;x&quot;:&quot;y&quot;} or 1 &gt; 2 or whatever. Even **markdown**. -</span><span style="color:#323232;">--&gt; -</span><span style="color:#323232;">&lt;!--- Support everything CommonMark&#39;s parser does. --&gt; -</span><span style="color:#323232;">&lt;!----&gt; -</span><span style="color:#323232;">&lt;!--thistoo--&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This is &amp;lt;xmp&gt; not okay, but &lt;strong&gt;this&lt;/strong&gt; &lt;strong&gt;is&lt;/strong&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;This is &amp;lt;xmp&gt; not okay, but **this** &lt;strong&gt;is&lt;/strong&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;Nope, I won&#39;t have &amp;lt;textarea&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;No &amp;lt;textarea&gt; here either.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;This &lt;random /&gt; &lt;thing&gt; is okay&lt;/thing&gt; though.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;Yep, &lt;totally&gt;okay&lt;/totally&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;!-- HTML comments are okay, though. --&gt; -</span><span style="color:#323232;">&lt;p&gt;&amp;lt;!- But we&#39;re strict. -&amp;gt; -</span><span style="color:#323232;">&amp;lt;! No nonsense. &amp;gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;!-- Leave multiline comments the heck alone, though, okay? -</span><span style="color:#323232;">Even with {&quot;x&quot;:&quot;y&quot;} or 1 &gt; 2 or whatever. Even **markdown**. -</span><span style="color:#323232;">--&gt; -</span><span style="color:#323232;">&lt;!--- Support everything CommonMark&#39;s parser does. --&gt; -</span><span style="color:#323232;">&lt;!----&gt; -</span><span style="color:#323232;">&lt;!--thistoo--&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">## Footnotes -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">This is some text![^1]. Other text.[^footnote]. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Here&#39;s a thing[^other-note]. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">And another thing[^codeblock-note]. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">This doesn&#39;t have a referent[^nope]. -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^other-note]: no code block here (spaces are stripped away) -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^codeblock-note]: -</span><span style="color:#323232;"> this is now a code block (8 spaces indentation) -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^1]: Some *bolded* footnote definition. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Hi! -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^footnote]: -</span><span style="color:#323232;"> &gt; Blockquotes can be in a footnote. -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> as well as code blocks -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> or, naturally, simple paragraphs. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^unused]: This is unused. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This is some text!&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-1&quot; id=&quot;fnref-1&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;. Other text.&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-footnote&quot; id=&quot;fnref-footnote&quot; data-footnote-ref&gt;2&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;Here&#39;s a thing&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-other-note&quot; id=&quot;fnref-other-note&quot; data-footnote-ref&gt;3&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;And another thing&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-codeblock-note&quot; id=&quot;fnref-codeblock-note&quot; data-footnote-ref&gt;4&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;This doesn&#39;t have a referent[^nope].&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;Hi!&lt;/p&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-1&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;Some &lt;em&gt;bolded&lt;/em&gt; footnote definition. &lt;a href=&quot;#fnref-1&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-footnote&quot;&gt; -</span><span style="color:#323232;">&lt;blockquote&gt; -</span><span style="color:#323232;">&lt;p&gt;Blockquotes can be in a footnote.&lt;/p&gt; -</span><span style="color:#323232;">&lt;/blockquote&gt; -</span><span style="color:#323232;">&lt;pre&gt;&lt;code&gt;as well as code blocks -</span><span style="color:#323232;">&lt;/code&gt;&lt;/pre&gt; -</span><span style="color:#323232;">&lt;p&gt;or, naturally, simple paragraphs. &lt;a href=&quot;#fnref-footnote&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-other-note&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;no code block here (spaces are stripped away) &lt;a href=&quot;#fnref-other-note&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-codeblock-note&quot;&gt; -</span><span style="color:#323232;">&lt;pre&gt;&lt;code&gt;this is now a code block (8 spaces indentation) -</span><span style="color:#323232;">&lt;/code&gt;&lt;/pre&gt; -</span><span style="color:#323232;">&lt;a href=&quot;#fnref-codeblock-note&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">## When a footnote is used multiple times, we insert multiple backrefs. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">This is some text. It has a footnote[^a-footnote]. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">This footnote is referenced[^a-footnote] multiple times, in lots of different places.[^a-footnote] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^a-footnote]: This footnote definition should have three backrefs. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This is some text. It has a footnote&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-a-footnote&quot; id=&quot;fnref-a-footnote&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;This footnote is referenced&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-a-footnote&quot; id=&quot;fnref-a-footnote-2&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt; multiple times, in lots of different places.&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-a-footnote&quot; id=&quot;fnref-a-footnote-3&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-a-footnote&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;This footnote definition should have three backrefs. &lt;a href=&quot;#fnref-a-footnote&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt; &lt;a href=&quot;#fnref-a-footnote-2&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;sup class=&quot;footnote-ref&quot;&gt;2&lt;/sup&gt;&lt;/a&gt; &lt;a href=&quot;#fnref-a-footnote-3&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;sup class=&quot;footnote-ref&quot;&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">## Footnote reference labels are href escaped -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">Hello[^&quot;&gt;&lt;script&gt;alert(1)&lt;/script&gt;] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^&quot;&gt;&lt;script&gt;alert(1)&lt;/script&gt;]: pwned -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Hello&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E&quot; id=&quot;fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;pwned &lt;a href=&quot;#fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">## Interop -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Autolink and strikethrough. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">~~www.google.com~~ -</span><span style="color:#323232;"> -</span><span style="color:#323232;">~~http://google.com~~ -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;&lt;del&gt;&lt;a href=&quot;http://www.google.com&quot;&gt;www.google.com&lt;/a&gt;&lt;/del&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;del&gt;&lt;a href=&quot;http://google.com&quot;&gt;http://google.com&lt;/a&gt;&lt;/del&gt;&lt;/p&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Autolink and tables. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">| a | b | -</span><span style="color:#323232;">| --- | --- | -</span><span style="color:#323232;">| https://github.com www.github.com | http://pokemon.com | -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;a&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;b&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;a href=&quot;https://github.com&quot;&gt;https://github.com&lt;/a&gt; &lt;a href=&quot;http://www.github.com&quot;&gt;www.github.com&lt;/a&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;&lt;a href=&quot;http://pokemon.com&quot;&gt;http://pokemon.com&lt;/a&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">## Task lists -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">- [ ] foo -</span><span style="color:#323232;">- [x] bar -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; disabled=&quot;&quot; /&gt; foo&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;&quot; disabled=&quot;&quot; /&gt; bar&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Show that a task list and a regular list get processed the same in -</span><span style="color:#323232;">the way that sublists are created. If something works in a list -</span><span style="color:#323232;">item, then it should work the same way with a task. The only -</span><span style="color:#323232;">difference should be the tasklist marker. So, if we use something -</span><span style="color:#323232;">other than a space or x, it won&#39;t be recognized as a task item, and -</span><span style="color:#323232;">so will be treated as a regular item. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">- [x] foo -</span><span style="color:#323232;"> - [ ] bar -</span><span style="color:#323232;"> - [x] baz -</span><span style="color:#323232;">- [ ] bim -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Show a regular (non task) list to show that it has the same structure -</span><span style="color:#323232;">- [@] foo -</span><span style="color:#323232;"> - [@] bar -</span><span style="color:#323232;"> - [@] baz -</span><span style="color:#323232;">- [@] bim -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;&quot; disabled=&quot;&quot; /&gt; foo -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; disabled=&quot;&quot; /&gt; bar&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;&quot; disabled=&quot;&quot; /&gt; baz&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; disabled=&quot;&quot; /&gt; bim&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">&lt;p&gt;Show a regular (non task) list to show that it has the same structure&lt;/p&gt; -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;[@] foo -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;[@] bar&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;[@] baz&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;[@] bim&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span><span style="color:#323232;">Use a larger indent -- a task list and a regular list should produce -</span><span style="color:#323232;">the same structure. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">```````````````````````````````` example -</span><span style="color:#323232;">- [x] foo -</span><span style="color:#323232;"> - [ ] bar -</span><span style="color:#323232;"> - [x] baz -</span><span style="color:#323232;">- [ ] bim -</span><span style="color:#323232;"> -</span><span style="color:#323232;">Show a regular (non task) list to show that it has the same structure -</span><span style="color:#323232;">- [@] foo -</span><span style="color:#323232;"> - [@] bar -</span><span style="color:#323232;"> - [@] baz -</span><span style="color:#323232;">- [@] bim -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;&quot; disabled=&quot;&quot; /&gt; foo -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; disabled=&quot;&quot; /&gt; bar&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;&quot; disabled=&quot;&quot; /&gt; baz&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;&lt;input type=&quot;checkbox&quot; disabled=&quot;&quot; /&gt; bim&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">&lt;p&gt;Show a regular (non task) list to show that it has the same structure&lt;/p&gt; -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;[@] foo -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;[@] bar&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;[@] baz&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li&gt;[@] bim&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">```````````````````````````````` -</span></pre> -</div></html> \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/markdown/extensions.md b/projects/panduck-sycamore/tests/markdown/extensions.md deleted file mode 100644 index 52fb29d..0000000 --- a/projects/panduck-sycamore/tests/markdown/extensions.md +++ /dev/null @@ -1,863 +0,0 @@ ---- -title: Extensions test -author: Yuki Izumi -version: 0.1 -date: '2016-08-31' -license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)' -... - -## Tables - -Here's a well-formed table, doing everything it should. - -```````````````````````````````` example -| abc | def | -| --- | --- | -| ghi | jkl | -| mno | pqr | -. -<table> -<thead> -<tr> -<th>abc</th> -<th>def</th> -</tr> -</thead> -<tbody> -<tr> -<td>ghi</td> -<td>jkl</td> -</tr> -<tr> -<td>mno</td> -<td>pqr</td> -</tr> -</tbody> -</table> -```````````````````````````````` - -We're going to mix up the table now; we'll demonstrate that inline formatting -works fine, but block elements don't. You can also have empty cells, and the -textual alignment of the columns is shown to be irrelevant. - -```````````````````````````````` example -Hello! - -| _abc_ | セン | -| ----- | ---- | -| 1. Block elements inside cells don't work. | | -| But _**inline elements do**_. | x | - -Hi! -. -<p>Hello!</p> -<table> -<thead> -<tr> -<th><em>abc</em></th> -<th>セン</th> -</tr> -</thead> -<tbody> -<tr> -<td>1. Block elements inside cells don't work.</td> -<td></td> -</tr> -<tr> -<td>But <em><strong>inline elements do</strong></em>.</td> -<td>x</td> -</tr> -</tbody> -</table> -<p>Hi!</p> -```````````````````````````````` - -Here we demonstrate some edge cases about what is and isn't a table. - -```````````````````````````````` example -| Not enough table | to be considered table | - -| Not enough table | to be considered table | -| Not enough table | to be considered table | - -| Just enough table | to be considered table | -| ----------------- | ---------------------- | - -| ---- | --- | - -|x| -|-| - -| xyz | -| --- | -. -<p>| Not enough table | to be considered table |</p> -<p>| Not enough table | to be considered table | -| Not enough table | to be considered table |</p> -<table> -<thead> -<tr> -<th>Just enough table</th> -<th>to be considered table</th> -</tr> -</thead> -</table> -<p>| ---- | --- |</p> -<table> -<thead> -<tr> -<th>x</th> -</tr> -</thead> -</table> -<table> -<thead> -<tr> -<th>xyz</th> -</tr> -</thead> -</table> -```````````````````````````````` - -A "simpler" table, GFM style: - -```````````````````````````````` example -abc | def ---- | --- -xyz | ghi -. -<table> -<thead> -<tr> -<th>abc</th> -<th>def</th> -</tr> -</thead> -<tbody> -<tr> -<td>xyz</td> -<td>ghi</td> -</tr> -</tbody> -</table> -```````````````````````````````` - -We are making the parser slighly more lax here. Here is a table with spaces at -the end: - -```````````````````````````````` example -Hello! - -| _abc_ | セン | -| ----- | ---- | -| this row has a space at the end | | -| But _**inline elements do**_. | x | - -Hi! -. -<p>Hello!</p> -<table> -<thead> -<tr> -<th><em>abc</em></th> -<th>セン</th> -</tr> -</thead> -<tbody> -<tr> -<td>this row has a space at the end</td> -<td></td> -</tr> -<tr> -<td>But <em><strong>inline elements do</strong></em>.</td> -<td>x</td> -</tr> -</tbody> -</table> -<p>Hi!</p> -```````````````````````````````` - -Table alignment: - -```````````````````````````````` example -aaa | bbb | ccc | ddd | eee -:-- | --- | :-: | --- | --: -fff | ggg | hhh | iii | jjj -. -<table> -<thead> -<tr> -<th align="left">aaa</th> -<th>bbb</th> -<th align="center">ccc</th> -<th>ddd</th> -<th align="right">eee</th> -</tr> -</thead> -<tbody> -<tr> -<td align="left">fff</td> -<td>ggg</td> -<td align="center">hhh</td> -<td>iii</td> -<td align="right">jjj</td> -</tr> -</tbody> -</table> -```````````````````````````````` - -### Table cell count mismatches - -The header and marker row must match. - -```````````````````````````````` example -| a | b | c | -| --- | --- | -| this | isn't | okay | -. -<p>| a | b | c | -| --- | --- | -| this | isn't | okay |</p> -```````````````````````````````` - -But any of the body rows can be shorter. Rows longer -than the header are truncated. - -```````````````````````````````` example -| a | b | c | -| --- | --- | --- -| x -| a | b -| 1 | 2 | 3 | 4 | 5 | -. -<table> -<thead> -<tr> -<th>a</th> -<th>b</th> -<th>c</th> -</tr> -</thead> -<tbody> -<tr> -<td>x</td> -<td></td> -<td></td> -</tr> -<tr> -<td>a</td> -<td>b</td> -<td></td> -</tr> -<tr> -<td>1</td> -<td>2</td> -<td>3</td> -</tr> -</tbody> -</table> -```````````````````````````````` - -### Embedded pipes - -Tables with embedded pipes could be tricky. - -```````````````````````````````` example -| a | b | -| --- | --- | -| Escaped pipes are \|okay\|. | Like \| this. | -| Within `\|code\| is okay` too. | -| _**`c\|`**_ \| complex -| don't **\_reparse\_** -. -<table> -<thead> -<tr> -<th>a</th> -<th>b</th> -</tr> -</thead> -<tbody> -<tr> -<td>Escaped pipes are |okay|.</td> -<td>Like | this.</td> -</tr> -<tr> -<td>Within <code>|code| is okay</code> too.</td> -<td></td> -</tr> -<tr> -<td><em><strong><code>c|</code></strong></em> | complex</td> -<td></td> -</tr> -<tr> -<td>don't <strong>_reparse_</strong></td> -<td></td> -</tr> -</tbody> -</table> -```````````````````````````````` - -### Oddly-formatted markers - -This shouldn't assert. - -```````````````````````````````` example -| a | ---- | -. -<table> -<thead> -<tr> -<th>a</th> -</tr> -</thead> -</table> -```````````````````````````````` - -### Escaping - -```````````````````````````````` example -| a | b | -| --- | --- | -| \\ | `\\` | -| \\\\ | `\\\\` | -| \_ | `\_` | -| \| | `\|` | -| \a | `\a` | - -\\ `\\` - -\\\\ `\\\\` - -\_ `\_` - -\| `\|` - -\a `\a` -. -<table> -<thead> -<tr> -<th>a</th> -<th>b</th> -</tr> -</thead> -<tbody> -<tr> -<td>\</td> -<td><code>\\</code></td> -</tr> -<tr> -<td>\\</td> -<td><code>\\\\</code></td> -</tr> -<tr> -<td>_</td> -<td><code>\_</code></td> -</tr> -<tr> -<td>|</td> -<td><code>|</code></td> -</tr> -<tr> -<td>\a</td> -<td><code>\a</code></td> -</tr> -</tbody> -</table> -<p>\ <code>\\</code></p> -<p>\\ <code>\\\\</code></p> -<p>_ <code>\_</code></p> -<p>| <code>\|</code></p> -<p>\a <code>\a</code></p> -```````````````````````````````` - -### Embedded HTML - -```````````````````````````````` example -| a | -| --- | -| <strong>hello</strong> | -| ok <br> sure | -. -<table> -<thead> -<tr> -<th>a</th> -</tr> -</thead> -<tbody> -<tr> -<td><strong>hello</strong></td> -</tr> -<tr> -<td>ok <br> sure</td> -</tr> -</tbody> -</table> -```````````````````````````````` - -### Reference-style links - -```````````````````````````````` example -Here's a link to [Freedom Planet 2][]. - -| Here's a link to [Freedom Planet 2][] in a table header. | -| --- | -| Here's a link to [Freedom Planet 2][] in a table row. | - -[Freedom Planet 2]: http://www.freedomplanet2.com/ -. -<p>Here's a link to <a href="http://www.freedomplanet2.com/">Freedom Planet 2</a>.</p> -<table> -<thead> -<tr> -<th>Here's a link to <a href="http://www.freedomplanet2.com/">Freedom Planet 2</a> in a table header.</th> -</tr> -</thead> -<tbody> -<tr> -<td>Here's a link to <a href="http://www.freedomplanet2.com/">Freedom Planet 2</a> in a table row.</td> -</tr> -</tbody> -</table> -```````````````````````````````` - -### Sequential cells - -```````````````````````````````` example -| a | b | c | -| --- | --- | --- | -| d || e | -. -<table> -<thead> -<tr> -<th>a</th> -<th>b</th> -<th>c</th> -</tr> -</thead> -<tbody> -<tr> -<td>d</td> -<td></td> -<td>e</td> -</tr> -</tbody> -</table> -```````````````````````````````` - -### Interaction with emphasis - -```````````````````````````````` example -| a | b | -| --- | --- | -|***(a)***| -. -<table> -<thead> -<tr> -<th>a</th> -<th>b</th> -</tr> -</thead> -<tbody> -<tr> -<td><em><strong>(a)</strong></em></td> -<td></td> -</tr> -</tbody> -</table> -```````````````````````````````` - -### a table can be recognised when separated from a paragraph of text without an empty line - -```````````````````````````````` example -123 -456 -| a | b | -| ---| --- | -d | e -. -<p>123 -456</p> -<table> -<thead> -<tr> -<th>a</th> -<th>b</th> -</tr> -</thead> -<tbody> -<tr> -<td>d</td> -<td>e</td> -</tr> -</tbody> -</table> -```````````````````````````````` - -## Strikethroughs - -A well-formed strikethrough. - -```````````````````````````````` example -A proper ~strikethrough~. -. -<p>A proper <del>strikethrough</del>.</p> -```````````````````````````````` - -Some strikethrough edge cases. - -```````````````````````````````` example -These are ~not strikethroughs. - -No, they are not~ - -This ~is ~ legit~ isn't ~ legit. - -This is not ~~~~~one~~~~~ huge strikethrough. - -~one~ ~~two~~ ~~~three~~~ - -No ~mismatch~~ -. -<p>These are ~not strikethroughs.</p> -<p>No, they are not~</p> -<p>This <del>is ~ legit</del> isn't ~ legit.</p> -<p>This is not ~~~~~one~~~~~ huge strikethrough.</p> -<p><del>one</del> <del>two</del> ~~~three~~~</p> -<p>No ~mismatch~~</p> -```````````````````````````````` - -Using 200 tilde since it overflows the internal buffer -size (100) for parsing delimiters in inlines.c -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~striked~ - -## Autolinks - -```````````````````````````````` example -: http://google.com https://google.com - -<http://google.com/å> http://google.com/å - -scyther@pokemon.com - -www.github.com www.github.com/á - -www.google.com/a_b - -**Autolink and http://inlines** - -![http://inline.com/image](http://inline.com/image) - -a.w@b.c - -Full stop outside parens shouldn't be included http://google.com/ok. - -(Full stop inside parens shouldn't be included http://google.com/ok.) - -"http://google.com" - -'http://google.com' - -http://🍄.ga/ http://x🍄.ga/ -. -<p>: <a href="http://google.com">http://google.com</a> <a href="https://google.com">https://google.com</a></p> -<p><a href="http://google.com/%C3%A5">http://google.com/å</a> <a href="http://google.com/%C3%A5">http://google.com/å</a></p> -<p><a href="mailto:scyther@pokemon.com">scyther@pokemon.com</a></p> -<p><a href="http://www.github.com">www.github.com</a> <a href="http://www.github.com/%C3%A1">www.github.com/á</a></p> -<p><a href="http://www.google.com/a_b">www.google.com/a_b</a></p> -<p><strong>Autolink and <a href="http://inlines">http://inlines</a></strong></p> -<p><img src="http://inline.com/image" alt="http://inline.com/image" /></p> -<p><a href="mailto:a.w@b.c">a.w@b.c</a></p> -<p>Full stop outside parens shouldn't be included <a href="http://google.com/ok">http://google.com/ok</a>.</p> -<p>(Full stop inside parens shouldn't be included <a href="http://google.com/ok">http://google.com/ok</a>.)</p> -<p>&quot;<a href="http://google.com">http://google.com</a>&quot;</p> -<p>'<a href="http://google.com">http://google.com</a>'</p> -<p><a href="http://%F0%9F%8D%84.ga/">http://🍄.ga/</a> <a href="http://x%F0%9F%8D%84.ga/">http://x🍄.ga/</a></p> -```````````````````````````````` - -```````````````````````````````` example -This shouldn't crash everything: (_A_@_.A -. -<IGNORE> -```````````````````````````````` - -```````````````````````````````` example -These should not link: - -* @a.b.c@. x -* n@. b -. -<p>These should not link:</p> -<ul> -<li>@a.b.c@. x</li> -<li>n@. b</li> -</ul> -```````````````````````````````` - -## HTML tag filter - - -```````````````````````````````` example -This is <xmp> not okay, but **this** <strong>is</strong>. - -<p>This is <xmp> not okay, but **this** <strong>is</strong>.</p> - -Nope, I won't have <textarea>. - -<p>No <textarea> here either.</p> - -<p>This <random /> <thing> is okay</thing> though.</p> - -Yep, <totally>okay</totally>. - -<!-- HTML comments are okay, though. --> -<!- But we're strict. -> -<! No nonsense. > -<!-- Leave multiline comments the heck alone, though, okay? -Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**. ---> -<!--- Support everything CommonMark's parser does. --> -<!----> -<!--thistoo--> -. -<p>This is &lt;xmp> not okay, but <strong>this</strong> <strong>is</strong>.</p> -<p>This is &lt;xmp> not okay, but **this** <strong>is</strong>.</p> -<p>Nope, I won't have &lt;textarea>.</p> -<p>No &lt;textarea> here either.</p> -<p>This <random /> <thing> is okay</thing> though.</p> -<p>Yep, <totally>okay</totally>.</p> -<!-- HTML comments are okay, though. --> -<p>&lt;!- But we're strict. -&gt; -&lt;! No nonsense. &gt;</p> -<!-- Leave multiline comments the heck alone, though, okay? -Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**. ---> -<!--- Support everything CommonMark's parser does. --> -<!----> -<!--thistoo--> -```````````````````````````````` - -## Footnotes - -```````````````````````````````` example -This is some text![^1]. Other text.[^footnote]. - -Here's a thing[^other-note]. - -And another thing[^codeblock-note]. - -This doesn't have a referent[^nope]. - - -[^other-note]: no code block here (spaces are stripped away) - -[^codeblock-note]: - this is now a code block (8 spaces indentation) - -[^1]: Some *bolded* footnote definition. - -Hi! - -[^footnote]: - > Blockquotes can be in a footnote. - - as well as code blocks - - or, naturally, simple paragraphs. - -[^unused]: This is unused. -. -<p>This is some text!<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup>. Other text.<sup class="footnote-ref"><a href="#fn-footnote" id="fnref-footnote" data-footnote-ref>2</a></sup>.</p> -<p>Here's a thing<sup class="footnote-ref"><a href="#fn-other-note" id="fnref-other-note" data-footnote-ref>3</a></sup>.</p> -<p>And another thing<sup class="footnote-ref"><a href="#fn-codeblock-note" id="fnref-codeblock-note" data-footnote-ref>4</a></sup>.</p> -<p>This doesn't have a referent[^nope].</p> -<p>Hi!</p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-1"> -<p>Some <em>bolded</em> footnote definition. <a href="#fnref-1" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-footnote"> -<blockquote> -<p>Blockquotes can be in a footnote.</p> -</blockquote> -<pre><code>as well as code blocks -</code></pre> -<p>or, naturally, simple paragraphs. <a href="#fnref-footnote" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-other-note"> -<p>no code block here (spaces are stripped away) <a href="#fnref-other-note" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-codeblock-note"> -<pre><code>this is now a code block (8 spaces indentation) -</code></pre> -<a href="#fnref-codeblock-note" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a> -</li> -</ol> -</section> -```````````````````````````````` - -## When a footnote is used multiple times, we insert multiple backrefs. - -```````````````````````````````` example -This is some text. It has a footnote[^a-footnote]. - -This footnote is referenced[^a-footnote] multiple times, in lots of different places.[^a-footnote] - -[^a-footnote]: This footnote definition should have three backrefs. -. -<p>This is some text. It has a footnote<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote" data-footnote-ref>1</a></sup>.</p> -<p>This footnote is referenced<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-2" data-footnote-ref>1</a></sup> multiple times, in lots of different places.<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-3" data-footnote-ref>1</a></sup></p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-a-footnote"> -<p>This footnote definition should have three backrefs. <a href="#fnref-a-footnote" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a> <a href="#fnref-a-footnote-2" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩<sup class="footnote-ref">2</sup></a> <a href="#fnref-a-footnote-3" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩<sup class="footnote-ref">3</sup></a></p> -</li> -</ol> -</section> -```````````````````````````````` - -## Footnote reference labels are href escaped - -```````````````````````````````` example -Hello[^"><script>alert(1)</script>] - -[^"><script>alert(1)</script>]: pwned -. -<p>Hello<sup class="footnote-ref"><a href="#fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" id="fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" data-footnote-ref>1</a></sup></p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E"> -<p>pwned <a href="#fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -</ol> -</section> -```````````````````````````````` - -## Interop - -Autolink and strikethrough. - -```````````````````````````````` example -~~www.google.com~~ - -~~http://google.com~~ -. -<p><del><a href="http://www.google.com">www.google.com</a></del></p> -<p><del><a href="http://google.com">http://google.com</a></del></p> -```````````````````````````````` - -Autolink and tables. - -```````````````````````````````` example -| a | b | -| --- | --- | -| https://github.com www.github.com | http://pokemon.com | -. -<table> -<thead> -<tr> -<th>a</th> -<th>b</th> -</tr> -</thead> -<tbody> -<tr> -<td><a href="https://github.com">https://github.com</a> <a href="http://www.github.com">www.github.com</a></td> -<td><a href="http://pokemon.com">http://pokemon.com</a></td> -</tr> -</tbody> -</table> -```````````````````````````````` - -## Task lists - -```````````````````````````````` example -- [ ] foo -- [x] bar -. -<ul> -<li><input type="checkbox" disabled="" /> foo</li> -<li><input type="checkbox" checked="" disabled="" /> bar</li> -</ul> -```````````````````````````````` - -Show that a task list and a regular list get processed the same in -the way that sublists are created. If something works in a list -item, then it should work the same way with a task. The only -difference should be the tasklist marker. So, if we use something -other than a space or x, it won't be recognized as a task item, and -so will be treated as a regular item. - -```````````````````````````````` example -- [x] foo - - [ ] bar - - [x] baz -- [ ] bim - -Show a regular (non task) list to show that it has the same structure -- [@] foo - - [@] bar - - [@] baz -- [@] bim -. -<ul> -<li><input type="checkbox" checked="" disabled="" /> foo -<ul> -<li><input type="checkbox" disabled="" /> bar</li> -<li><input type="checkbox" checked="" disabled="" /> baz</li> -</ul> -</li> -<li><input type="checkbox" disabled="" /> bim</li> -</ul> -<p>Show a regular (non task) list to show that it has the same structure</p> -<ul> -<li>[@] foo -<ul> -<li>[@] bar</li> -<li>[@] baz</li> -</ul> -</li> -<li>[@] bim</li> -</ul> -```````````````````````````````` -Use a larger indent -- a task list and a regular list should produce -the same structure. - -```````````````````````````````` example -- [x] foo - - [ ] bar - - [x] baz -- [ ] bim - -Show a regular (non task) list to show that it has the same structure -- [@] foo - - [@] bar - - [@] baz -- [@] bim -. -<ul> -<li><input type="checkbox" checked="" disabled="" /> foo -<ul> -<li><input type="checkbox" disabled="" /> bar</li> -<li><input type="checkbox" checked="" disabled="" /> baz</li> -</ul> -</li> -<li><input type="checkbox" disabled="" /> bim</li> -</ul> -<p>Show a regular (non task) list to show that it has the same structure</p> -<ul> -<li>[@] foo -<ul> -<li>[@] bar</li> -<li>[@] baz</li> -</ul> -</li> -<li>[@] bim</li> -</ul> -```````````````````````````````` \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/markdown/markdown-it.html b/projects/panduck-sycamore/tests/markdown/markdown-it.html deleted file mode 100644 index 0faf0f2..0000000 --- a/projects/panduck-sycamore/tests/markdown/markdown-it.html +++ /dev/null @@ -1,32 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><pre style="background-color:#ffffff;"> -<span style="color:#323232;">--- -</span><span style="color:#323232;">title: Markdown it! -</span><span style="color:#323232;">lang: en-US -</span><span style="color:#323232;">--- -</span></pre> -<p><strong>Advertisement :)</strong></p><ul><li><p><strong><a href="https://nodeca.github.io/pica/demo/"></a></strong> - high quality and fast image -resize in browser.</p></li><li><p><strong><a href="https://github.com/nodeca/babelfish/"></a></strong> - developer friendly -i18n with plurals support and easy syntax.</p></li></ul><p>You will like those projects!</p><p>===</p><h1>h1 Heading 8-)</h1><h2>h2 Heading</h2><h3>h3 Heading</h3><h4>h4 Heading</h4><h5>h5 Heading</h5><h6>h6 Heading</h6><h2>Horizontal Rules</h2><hr/><hr/><hr/><h2>Typographic replacements</h2><p>Enable typographer option to see result.</p><p>(c) (C) (r) (R) (tm) (TM) (p) (P) +––</p><p>test.. test… test….. test?….. test!….</p><p>!!!!!! ???? ,, – —</p><p>“Smartypants, double quotes” and ‘single quotes’</p><h2>Emphasis</h2><p><strong>This is bold text</strong></p><p><strong>This is bold text</strong></p><p><em>This is italic text</em></p><p><em>This is italic text</em></p><p><del>Strikethrough</del></p><h2>Blockquotes</h2><blockquote><p>Blockquotes can also be nested…</p><blockquote><p>…by using additional greater-than signs right next to each other…</p><blockquote><p>…or with spaces between arrows.</p></blockquote></blockquote></blockquote><h2>Lists</h2><p>Unordered</p><ul><li><p>Create a list by starting a line with <code><span style="color:#323232;">+</span></code>, <code><span style="color:#323232;">-</span></code>, or <code><span style="color:#323232;">*</span></code></p></li><li><p>Sub-lists are made by indenting 2 spaces:</p><ul><li><p>Marker character change forces new list start:</p><ul><li><p>Ac tristique libero volutpat at</p></li></ul><ul><li><p>Facilisis in pretium nisl aliquet</p></li></ul><ul><li><p>Nulla volutpat aliquam velit</p></li></ul></li></ul></li><li><p>Very easy!</p></li></ul><p>Ordered</p><ol><li><p>Lorem ipsum dolor sit amet</p></li><li><p>Consectetur adipiscing elit</p></li><li><p>Integer molestie lorem at massa</p></li><li><p>You can use sequential numbers…</p></li><li><p>…or keep all the numbers as <code><span style="color:#323232;">1.</span></code></p></li></ol><p>Start numbering with offset:</p><ol><li><p>foo</p></li><li><p>bar</p></li></ol><h2>Code</h2><p>Inline <code><span style="color:#323232;">code</span></code></p><p>Indented code</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">// Some comments -</span><span style="color:#323232;">line 1 of code -</span><span style="color:#323232;">line 2 of code -</span><span style="color:#323232;">line 3 of code -</span></pre> -<p>Block code “fences”</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Sample text here... -</span></pre> -<p>Syntax highlighting</p><pre style="background-color:#ffffff;"> -<span style="font-weight:bold;color:#a71d5d;">var </span><span style="font-weight:bold;color:#795da3;">foo </span><span style="font-weight:bold;color:#a71d5d;">= function </span><span style="color:#323232;">(bar) { -</span><span style="color:#323232;"> </span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#323232;">bar</span><span style="font-weight:bold;color:#a71d5d;">++</span><span style="color:#323232;">; -</span><span style="color:#323232;">}; -</span><span style="color:#323232;"> -</span><span style="color:#795da3;">console</span><span style="color:#323232;">.</span><span style="color:#0086b3;">log</span><span style="color:#323232;">(foo(</span><span style="color:#0086b3;">5</span><span style="color:#323232;">)); -</span></pre> -<h2>Tables</h2><value>Null</value><p>Right aligned columns</p><value>Null</value><h2>Links</h2><p><a href="http://dev.nodeca.com"></a></p><p><a href="http://nodeca.github.io/pica/demo/">title text!</a></p><p>Autoconverted link <a href="https://github.com/nodeca/pica"></a> (enable linkify to see)</p><h2>Images</h2><p><img src="https://octodex.github.com/images/minion.png"/> -<img src="https://octodex.github.com/images/stormtroopocat.jpg" alt="The Stormtroopocat"/></p><p>Like links, Images also have a footnote style syntax</p><p><img src="https://octodex.github.com/images/dojocat.jpg" alt="The Dojocat"/></p><p>With a reference later in the document defining the URL location:</p><h2>Plugins</h2><p>The killer feature of <code><span style="color:#323232;">markdown-it</span></code> is very effective support of -<a href="https://www.npmjs.org/browse/keyword/markdown-it-plugin"></a>.</p><h3><a href="https://github.com/markdown-it/markdown-it-emoji"></a></h3><blockquote><p>Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:</p><p>Shortcuts (emoticons): :-) :-( 8-) ;)</p></blockquote><p>see <a href="https://github.com/markdown-it/markdown-it-emoji#change-output"></a> with twemoji.</p><h3><a href="https://github.com/markdown-it/markdown-it-sub"></a> / <a href="https://github.com/markdown-it/markdown-it-sup"></a></h3><ul><li><p>19<sup>th</sup></p></li><li><p>H<del>2</del>O</p></li></ul><h3><a href="https://github.com/markdown-it/markdown-it-ins"></a></h3><p>++Inserted text++</p><h3><a href="https://github.com/markdown-it/markdown-it-mark"></a></h3><p>==Marked text==</p><h3><a href="https://github.com/markdown-it/markdown-it-footnote"></a></h3><p>Footnote 1 link[^first].</p><p>Footnote 2 link[^second].</p><p>Inline footnote^[Text of inline footnote] definition.</p><p>Duplicated footnote reference[^second].</p><h3><a href="https://github.com/markdown-it/markdown-it-deflist"></a></h3><value>Null</value><p><em>Compact style:</em></p><p>Term 1 -~ Definition 1</p><p>Term 2 -~ Definition 2a -~ Definition 2b</p><h3><a href="https://github.com/markdown-it/markdown-it-abbr"></a></h3><p>This is HTML abbreviation example.</p><p>It converts “HTML”, but keep intact partial entries like “xxxHTMLyyy” and so on.</p><p>*[HTML]: Hyper Text Markup Language</p><h3><a href="https://github.com/markdown-it/markdown-it-container"></a></h3><p>::: warning -<em>here be dragons</em> -:::</p></div></html> \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/markdown/markdown-it.md b/projects/panduck-sycamore/tests/markdown/markdown-it.md deleted file mode 100644 index 26587a7..0000000 --- a/projects/panduck-sycamore/tests/markdown/markdown-it.md +++ /dev/null @@ -1,249 +0,0 @@ ---- -title: Markdown it! -lang: en-US ---- - -__Advertisement :)__ - -- __[pica](https://nodeca.github.io/pica/demo/)__ - high quality and fast image - resize in browser. -- __[babelfish](https://github.com/nodeca/babelfish/)__ - developer friendly - i18n with plurals support and easy syntax. - -You will like those projects! - -=== - -# h1 Heading 8-) -## h2 Heading -### h3 Heading -#### h4 Heading -##### h5 Heading -###### h6 Heading - - -## Horizontal Rules - -___ - ---- - -*** - - -## Typographic replacements - -Enable typographer option to see result. - -(c) (C) (r) (R) (tm) (TM) (p) (P) +- - -test.. test... test..... test?..... test!.... - -!!!!!! ???? ,, -- --- - -"Smartypants, double quotes" and 'single quotes' - - -## Emphasis - -**This is bold text** - -__This is bold text__ - -*This is italic text* - -_This is italic text_ - -~~Strikethrough~~ - - -## Blockquotes - - -> Blockquotes can also be nested... ->> ...by using additional greater-than signs right next to each other... -> > > ...or with spaces between arrows. - - -## Lists - -Unordered - -+ Create a list by starting a line with `+`, `-`, or `*` -+ Sub-lists are made by indenting 2 spaces: - - Marker character change forces new list start: - * Ac tristique libero volutpat at - + Facilisis in pretium nisl aliquet - - Nulla volutpat aliquam velit -+ Very easy! - -Ordered - -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa - - -1. You can use sequential numbers... -1. ...or keep all the numbers as `1.` - -Start numbering with offset: - -57. foo -1. bar - - -## Code - -Inline `code` - -Indented code - - // Some comments - line 1 of code - line 2 of code - line 3 of code - - -Block code "fences" - -``` -Sample text here... -``` - -Syntax highlighting - -``` js -var foo = function (bar) { - return bar++; -}; - -console.log(foo(5)); -``` - -## Tables - -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - -Right aligned columns - -| Option | Description | -| ------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - - -## Links - -[link text](http://dev.nodeca.com) - -[link with title](http://nodeca.github.io/pica/demo/ "title text!") - -Autoconverted link https://github.com/nodeca/pica (enable linkify to see) - - -## Images - -![Minion](https://octodex.github.com/images/minion.png) -![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") - -Like links, Images also have a footnote style syntax - -![Alt text][id] - -With a reference later in the document defining the URL location: - -[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" - - -## Plugins - -The killer feature of `markdown-it` is very effective support of -[syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin). - - -### [Emojies](https://github.com/markdown-it/markdown-it-emoji) - -> Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum: -> -> Shortcuts (emoticons): :-) :-( 8-) ;) - -see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji. - - -### [Subscript](https://github.com/markdown-it/markdown-it-sub) / [Superscript](https://github.com/markdown-it/markdown-it-sup) - -- 19^th^ -- H~2~O - - -### [\<ins>](https://github.com/markdown-it/markdown-it-ins) - -++Inserted text++ - - -### [\<mark>](https://github.com/markdown-it/markdown-it-mark) - -==Marked text== - - -### [Footnotes](https://github.com/markdown-it/markdown-it-footnote) - -Footnote 1 link[^first]. - -Footnote 2 link[^second]. - -Inline footnote^[Text of inline footnote] definition. - -Duplicated footnote reference[^second]. - -[^first]: Footnote **can have markup** - - and multiple paragraphs. - -[^second]: Footnote text. - - -### [Definition lists](https://github.com/markdown-it/markdown-it-deflist) - -Term 1 - -: Definition 1 -with lazy continuation. - -Term 2 with *inline markup* - -: Definition 2 - - { some code, part of Definition 2 } - - Third paragraph of definition 2. - -_Compact style:_ - -Term 1 - ~ Definition 1 - -Term 2 - ~ Definition 2a - ~ Definition 2b - - -### [Abbreviations](https://github.com/markdown-it/markdown-it-abbr) - -This is HTML abbreviation example. - -It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. - -*[HTML]: Hyper Text Markup Language - -### [Custom containers](https://github.com/markdown-it/markdown-it-container) - -::: warning -*here be dragons* -::: diff --git a/projects/panduck-sycamore/tests/markdown/mod.rs b/projects/panduck-sycamore/tests/markdown/mod.rs deleted file mode 100644 index c2ce823..0000000 --- a/projects/panduck-sycamore/tests/markdown/mod.rs +++ /dev/null @@ -1,35 +0,0 @@ -use super::*; - -pub fn html_standalone(source: &str, target: &str) -> Result<()> { - html_standalone_builder(panduck_core::convert::parse_common_markdown)(source, target) -} - -#[test] -pub fn basic() -> Result<()> { - html_standalone(include_str!("basic.md"), include_str!("basic.html"))?; - Ok(()) -} - -#[test] -pub fn extensions() -> Result<()> { - html_standalone(include_str!("extensions.md"), include_str!("extensions.html"))?; - Ok(()) -} - -#[test] -pub fn regression() -> Result<()> { - html_standalone(include_str!("regression.md"), include_str!("regression.html"))?; - Ok(()) -} - -#[test] -pub fn markdown_it() -> Result<()> { - html_standalone(include_str!("markdown-it.md"), include_str!("markdown-it.html"))?; - Ok(()) -} - -#[test] -pub fn punctuation() -> Result<()> { - html_standalone(include_str!("punctuation.md"), include_str!("punctuation.html"))?; - Ok(()) -} diff --git a/projects/panduck-sycamore/tests/markdown/punctuation.html b/projects/panduck-sycamore/tests/markdown/punctuation.html deleted file mode 100644 index 3a91722..0000000 --- a/projects/panduck-sycamore/tests/markdown/punctuation.html +++ /dev/null @@ -1,137 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><h2>Smart punctuation</h2><p>Open quotes are matched with closed quotes. -The same method is used for matching openers and closers -as is used in emphasis parsing:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&quot;Hello,&quot; said the spider. -</span><span style="color:#323232;">&quot;&#39;Shelob&#39; is my name.&quot; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;“Hello,” said the spider. -</span><span style="color:#323232;">“‘Shelob’ is my name.”&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;A&#39;, &#39;B&#39;, and &#39;C&#39; are letters. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;‘A’, ‘B’, and ‘C’ are letters.&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;Oak,&#39; &#39;elm,&#39; and &#39;beech&#39; are names of trees. -</span><span style="color:#323232;">So is &#39;pine.&#39; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. -</span><span style="color:#323232;">So is ‘pine.’&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;He said, &quot;I want to go.&quot;&#39; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;‘He said, “I want to go.”’&lt;/p&gt; -</span></pre> -<p>A single quote that isn’t an open quote matched -with a close quote will be treated as an -apostrophe:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Were you alive in the 70&#39;s? -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Were you alive in the 70’s?&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">Here is some quoted &#39;`code`&#39; and a &quot;[quoted link](url)&quot;. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Here is some quoted ‘&lt;code&gt;code&lt;/code&gt;’ and a “&lt;a href=&quot;url&quot;&gt;quoted link&lt;/a&gt;”.&lt;/p&gt; -</span></pre> -<p>Here the first <code><span style="color:#323232;">&#39;</span></code> is treated as an apostrophe, not -an open quote, because the final single quote is matched -by the single quote before <code><span style="color:#323232;">jolly</span></code>:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;tis the season to be &#39;jolly&#39; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;’tis the season to be ‘jolly’&lt;/p&gt; -</span></pre> -<p>Multiple apostrophes should not be marked as open/closing quotes.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&#39;We&#39;ll use Jane&#39;s boat and John&#39;s truck,&#39; Jenna said. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;‘We’ll use Jane’s boat and John’s truck,’ Jenna said.&lt;/p&gt; -</span></pre> -<p>An unmatched double quote will be interpreted as a -left double quote, to facilitate this style:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&quot;A paragraph with no closing quote. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&quot;Second paragraph by same speaker, in fiction.&quot; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;“A paragraph with no closing quote.&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;“Second paragraph by same speaker, in fiction.”&lt;/p&gt; -</span></pre> -<p>A quote following a <code><span style="color:#323232;">]</span></code> or <code><span style="color:#323232;">)</span></code> character cannot -be an open quote:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a]&#39;s b&#39; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a]’s b’&lt;/p&gt; -</span></pre> -<p>Quotes that are escaped come out as literal straight -quotes:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">\&quot;This is not smart.\&quot; -</span><span style="color:#323232;">This isn\&#39;t either. -</span><span style="color:#323232;">5\&#39;8\&quot; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;&amp;quot;This is not smart.&amp;quot; -</span><span style="color:#323232;">This isn&#39;t either. -</span><span style="color:#323232;">5&#39;8&amp;quot;&lt;/p&gt; -</span></pre> -<p>Two hyphens form an en-dash, three an em-dash.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Some dashes: em---em -</span><span style="color:#323232;">en--en -</span><span style="color:#323232;">em --- em -</span><span style="color:#323232;">en -- en -</span><span style="color:#323232;">2--3 -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Some dashes: em—em -</span><span style="color:#323232;">en–en -</span><span style="color:#323232;">em — em -</span><span style="color:#323232;">en – en -</span><span style="color:#323232;">2–3&lt;/p&gt; -</span></pre> -<p>A sequence of more than three hyphens is -parsed as a sequence of em and/or en dashes, -with no hyphens. If possible, a homogeneous -sequence of dashes is used (so, 10 hyphens -= 5 en dashes, and 9 hyphens = 3 em dashes). -When a heterogeneous sequence must be used, -the em dashes come first, followed by the en -dashes, and as few en dashes as possible are -used (so, 7 hyphens = 2 em dashes an 1 en -dash).</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">one- -</span><span style="color:#323232;">two-- -</span><span style="color:#323232;">three--- -</span><span style="color:#323232;">four---- -</span><span style="color:#323232;">five----- -</span><span style="color:#323232;">six------ -</span><span style="color:#323232;">seven------- -</span><span style="color:#323232;">eight-------- -</span><span style="color:#323232;">nine--------- -</span><span style="color:#323232;">thirteen-------------. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;one- -</span><span style="color:#323232;">two– -</span><span style="color:#323232;">three— -</span><span style="color:#323232;">four–– -</span><span style="color:#323232;">five—– -</span><span style="color:#323232;">six—— -</span><span style="color:#323232;">seven—–– -</span><span style="color:#323232;">eight–––– -</span><span style="color:#323232;">nine——— -</span><span style="color:#323232;">thirteen———––.&lt;/p&gt; -</span></pre> -<p>Hyphens can be escaped:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Escaped hyphens: \-- \-\-\-. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Escaped hyphens: -- ---.&lt;/p&gt; -</span></pre> -<p>Three periods form an ellipsis:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Ellipses...and...and.... -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Ellipses…and…and….&lt;/p&gt; -</span></pre> -<p>Periods can be escaped if ellipsis-formation -is not wanted:</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">No ellipses\.\.\. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;No ellipses...&lt;/p&gt; -</span></pre> -</div></html> \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/markdown/punctuation.md b/projects/panduck-sycamore/tests/markdown/punctuation.md deleted file mode 100644 index 73bd687..0000000 --- a/projects/panduck-sycamore/tests/markdown/punctuation.md +++ /dev/null @@ -1,177 +0,0 @@ -## Smart punctuation - -Open quotes are matched with closed quotes. -The same method is used for matching openers and closers -as is used in emphasis parsing: - -```````````````````````````````` example -"Hello," said the spider. -"'Shelob' is my name." -. -<p>“Hello,” said the spider. -“‘Shelob’ is my name.”</p> -```````````````````````````````` - -```````````````````````````````` example -'A', 'B', and 'C' are letters. -. -<p>‘A’, ‘B’, and ‘C’ are letters.</p> -```````````````````````````````` - -```````````````````````````````` example -'Oak,' 'elm,' and 'beech' are names of trees. -So is 'pine.' -. -<p>‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. -So is ‘pine.’</p> -```````````````````````````````` - -```````````````````````````````` example -'He said, "I want to go."' -. -<p>‘He said, “I want to go.”’</p> -```````````````````````````````` - -A single quote that isn't an open quote matched -with a close quote will be treated as an -apostrophe: - -```````````````````````````````` example -Were you alive in the 70's? -. -<p>Were you alive in the 70’s?</p> -```````````````````````````````` - -```````````````````````````````` example -Here is some quoted '`code`' and a "[quoted link](url)". -. -<p>Here is some quoted ‘<code>code</code>’ and a “<a href="url">quoted link</a>”.</p> -```````````````````````````````` - -Here the first `'` is treated as an apostrophe, not -an open quote, because the final single quote is matched -by the single quote before `jolly`: - -```````````````````````````````` example -'tis the season to be 'jolly' -. -<p>’tis the season to be ‘jolly’</p> -```````````````````````````````` - -Multiple apostrophes should not be marked as open/closing quotes. - -```````````````````````````````` example -'We'll use Jane's boat and John's truck,' Jenna said. -. -<p>‘We’ll use Jane’s boat and John’s truck,’ Jenna said.</p> -```````````````````````````````` - -An unmatched double quote will be interpreted as a -left double quote, to facilitate this style: - -```````````````````````````````` example -"A paragraph with no closing quote. - -"Second paragraph by same speaker, in fiction." -. -<p>“A paragraph with no closing quote.</p> -<p>“Second paragraph by same speaker, in fiction.”</p> -```````````````````````````````` - -A quote following a `]` or `)` character cannot -be an open quote: - -```````````````````````````````` example -[a]'s b' -. -<p>[a]’s b’</p> -```````````````````````````````` - -Quotes that are escaped come out as literal straight -quotes: - -```````````````````````````````` example -\"This is not smart.\" -This isn\'t either. -5\'8\" -. -<p>&quot;This is not smart.&quot; -This isn't either. -5'8&quot;</p> -```````````````````````````````` - -Two hyphens form an en-dash, three an em-dash. - -```````````````````````````````` example -Some dashes: em---em -en--en -em --- em -en -- en -2--3 -. -<p>Some dashes: em—em -en–en -em — em -en – en -2–3</p> -```````````````````````````````` - -A sequence of more than three hyphens is -parsed as a sequence of em and/or en dashes, -with no hyphens. If possible, a homogeneous -sequence of dashes is used (so, 10 hyphens -= 5 en dashes, and 9 hyphens = 3 em dashes). -When a heterogeneous sequence must be used, -the em dashes come first, followed by the en -dashes, and as few en dashes as possible are -used (so, 7 hyphens = 2 em dashes an 1 en -dash). - -```````````````````````````````` example -one- -two-- -three--- -four---- -five----- -six------ -seven------- -eight-------- -nine--------- -thirteen-------------. -. -<p>one- -two– -three— -four–– -five—– -six—— -seven—–– -eight–––– -nine——— -thirteen———––.</p> -```````````````````````````````` - -Hyphens can be escaped: - -```````````````````````````````` example -Escaped hyphens: \-- \-\-\-. -. -<p>Escaped hyphens: -- ---.</p> -```````````````````````````````` - -Three periods form an ellipsis: - -```````````````````````````````` example -Ellipses...and...and.... -. -<p>Ellipses…and…and….</p> -```````````````````````````````` - -Periods can be escaped if ellipsis-formation -is not wanted: - -```````````````````````````````` example -No ellipses\.\.\. -. -<p>No ellipses...</p> -```````````````````````````````` \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/markdown/regression.html b/projects/panduck-sycamore/tests/markdown/regression.html deleted file mode 100644 index 7e217f5..0000000 --- a/projects/panduck-sycamore/tests/markdown/regression.html +++ /dev/null @@ -1,292 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><h3>Regression tests</h3><p>Issue #113: EOL character weirdness on Windows -(Important: first line ends with CR + CR + LF)</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">line1 -</span><span style="color:#323232;"> -</span><span style="color:#323232;">line2 -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;line1&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;line2&lt;/p&gt; -</span></pre> -<p>Issue #114: cmark skipping first character in line -(Important: the blank lines around “Repeatedly” contain a tab.)</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">By taking it apart -</span><span style="color:#323232;"> -</span><span style="color:#323232;">- alternative solutions -</span><span style="color:#323232;">→ -</span><span style="color:#323232;">Repeatedly solving -</span><span style="color:#323232;">→ -</span><span style="color:#323232;">- how techniques -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;By taking it apart&lt;/p&gt; -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;alternative solutions&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span><span style="color:#323232;">&lt;p&gt;Repeatedly solving&lt;/p&gt; -</span><span style="color:#323232;">&lt;ul&gt; -</span><span style="color:#323232;">&lt;li&gt;how techniques&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ul&gt; -</span></pre> -<p>Issue jgm/CommonMark#430: h2..h6 not recognized as block tags.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&lt;h1&gt;lorem&lt;/h1&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h2&gt;lorem&lt;/h2&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h3&gt;lorem&lt;/h3&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h4&gt;lorem&lt;/h4&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h5&gt;lorem&lt;/h5&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;h6&gt;lorem&lt;/h6&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;h1&gt;lorem&lt;/h1&gt; -</span><span style="color:#323232;">&lt;h2&gt;lorem&lt;/h2&gt; -</span><span style="color:#323232;">&lt;h3&gt;lorem&lt;/h3&gt; -</span><span style="color:#323232;">&lt;h4&gt;lorem&lt;/h4&gt; -</span><span style="color:#323232;">&lt;h5&gt;lorem&lt;/h5&gt; -</span><span style="color:#323232;">&lt;h6&gt;lorem&lt;/h6&gt; -</span></pre> -<p>Issue jgm/commonmark.js#109 - tabs after setext header line</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">hi -</span><span style="color:#323232;">--→ -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;h2&gt;hi&lt;/h2&gt; -</span></pre> -<p>Issue #177 - incorrect emphasis parsing</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">a***b* c* -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;a*&lt;em&gt;&lt;em&gt;b&lt;/em&gt; c&lt;/em&gt;&lt;/p&gt; -</span></pre> -<p>Issue #193 - unescaped left angle brackets in link destination</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[a]: &lt;te&lt;st&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a]&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;[a]: &amp;lt;te&lt;st&gt;&lt;/p&gt; -</span></pre> -<p>Issue #192 - escaped spaces in link destination</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a](te\ st) -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a](te\ st)&lt;/p&gt; -</span></pre> -<p>Issue github/github#76615: multiple delimiter combinations gets sketchy</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">~~**_`this`_**~~ -</span><span style="color:#323232;">~~***`this`***~~ -</span><span style="color:#323232;">~~___`this`___~~ -</span><span style="color:#323232;"> -</span><span style="color:#323232;">**_`this`_** -</span><span style="color:#323232;">***`this`*** -</span><span style="color:#323232;">___`this`___ -</span><span style="color:#323232;"> -</span><span style="color:#323232;">~~**_this_**~~ -</span><span style="color:#323232;">~~***this***~~ -</span><span style="color:#323232;">~~___this___~~ -</span><span style="color:#323232;"> -</span><span style="color:#323232;">**_this_** -</span><span style="color:#323232;">***this*** -</span><span style="color:#323232;">___this___ -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;&lt;del&gt;&lt;strong&gt;&lt;em&gt;&lt;code&gt;this&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/del&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;del&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;this&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;del&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;this&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;code&gt;this&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;em&gt;&lt;strong&gt;&lt;code&gt;this&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;em&gt;&lt;strong&gt;&lt;code&gt;this&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;del&gt;&lt;strong&gt;&lt;em&gt;this&lt;/em&gt;&lt;/strong&gt;&lt;/del&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;del&gt;&lt;em&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;del&gt;&lt;em&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;&lt;strong&gt;&lt;em&gt;this&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;em&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt; -</span><span style="color:#323232;">&lt;em&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; -</span></pre> -<p>Issue #527 - meta tags in inline contexts</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">City: -</span><span style="color:#323232;">&lt;span itemprop=&quot;contentLocation&quot; itemscope itemtype=&quot;https://schema.org/City&quot;&gt; -</span><span style="color:#323232;"> &lt;meta itemprop=&quot;name&quot; content=&quot;Springfield&quot;&gt; -</span><span style="color:#323232;">&lt;/span&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;City: -</span><span style="color:#323232;">&lt;span itemprop=&quot;contentLocation&quot; itemscope itemtype=&quot;https://schema.org/City&quot;&gt; -</span><span style="color:#323232;">&lt;meta itemprop=&quot;name&quot; content=&quot;Springfield&quot;&gt; -</span><span style="color:#323232;">&lt;/span&gt;&lt;/p&gt; -</span></pre> -<p>cmark-gfm strikethrough rules</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">~Hi~ Hello, world! -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;&lt;del&gt;Hi&lt;/del&gt; Hello, world!&lt;/p&gt; -</span></pre> -<pre style="background-color:#ffffff;"> -<span style="color:#323232;">This ~text~ ~~is~~ ~~~curious~~~. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This &lt;del&gt;text&lt;/del&gt; &lt;del&gt;is&lt;/del&gt; ~~~curious~~~.&lt;/p&gt; -</span></pre> -<p><code><span style="color:#323232;">~</span></code> should not be escaped in href — <a href="https://github.com/github/markup/issues/311"></a></p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[x](http://members.aon.at/~nkehrer/ibm_5110/emu5110.html) -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;&lt;a href=&quot;http://members.aon.at/~nkehrer/ibm_5110/emu5110.html&quot;&gt;x&lt;/a&gt;&lt;/p&gt; -</span></pre> -<p>Footnotes in tables</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">A footnote in a paragraph[^1] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">| Column1 | Column2 | -</span><span style="color:#323232;">| --------- | ------- | -</span><span style="color:#323232;">| foot [^1] | note | -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^1]: a footnote -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;A footnote in a paragraph&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-1&quot; id=&quot;fnref-1&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;table&gt; -</span><span style="color:#323232;">&lt;thead&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;th&gt;Column1&lt;/th&gt; -</span><span style="color:#323232;">&lt;th&gt;Column2&lt;/th&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/thead&gt; -</span><span style="color:#323232;">&lt;tbody&gt; -</span><span style="color:#323232;">&lt;tr&gt; -</span><span style="color:#323232;">&lt;td&gt;foot &lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-1&quot; id=&quot;fnref-1-2&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt; -</span><span style="color:#323232;">&lt;td&gt;note&lt;/td&gt; -</span><span style="color:#323232;">&lt;/tr&gt; -</span><span style="color:#323232;">&lt;/tbody&gt; -</span><span style="color:#323232;">&lt;/table&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-1&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;a footnote &lt;a href=&quot;#fnref-1&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt; &lt;a href=&quot;#fnref-1-2&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;sup class=&quot;footnote-ref&quot;&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span></pre> -<p>Issue #527 - meta tags in inline contexts</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">City: -</span><span style="color:#323232;">&lt;span itemprop=&quot;contentLocation&quot; itemscope itemtype=&quot;https://schema.org/City&quot;&gt; -</span><span style="color:#323232;"> &lt;meta itemprop=&quot;name&quot; content=&quot;Springfield&quot;&gt; -</span><span style="color:#323232;">&lt;/span&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;City: -</span><span style="color:#323232;">&lt;span itemprop=&quot;contentLocation&quot; itemscope itemtype=&quot;https://schema.org/City&quot;&gt; -</span><span style="color:#323232;">&lt;meta itemprop=&quot;name&quot; content=&quot;Springfield&quot;&gt; -</span><span style="color:#323232;">&lt;/span&gt;&lt;/p&gt; -</span></pre> -<p>Issue #530 - link parsing corner cases</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a](\ b) -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[a](&lt;&lt;b) -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[a](&lt;b -</span><span style="color:#323232;">) -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a](\ b)&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;[a](&amp;lt;&amp;lt;b)&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;[a](&amp;lt;b -</span><span style="color:#323232;">)&lt;/p&gt; -</span></pre> -<p>Issue commonmark#526 - unescaped ( in link title</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[link](url ((title)) -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[link](url ((title))&lt;/p&gt; -</span></pre> -<p>Issue commonamrk#517 - script, pre, style close tag without -opener.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">&lt;/script&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;/pre&gt; -</span><span style="color:#323232;"> -</span><span style="color:#323232;">&lt;/style&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;/script&gt; -</span><span style="color:#323232;">&lt;/pre&gt; -</span><span style="color:#323232;">&lt;/style&gt; -</span></pre> -<p>Issue #289.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[a](&lt;b) c&gt; -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[a](&amp;lt;b) c&amp;gt;&lt;/p&gt; -</span></pre> -<p>Pull request #128 - Buffer overread in tables extension</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">| -</span><span style="color:#323232;">-| -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;| -</span><span style="color:#323232;">-|&lt;/p&gt; -</span></pre> -<p>Footnotes may be nested inside other footnotes.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">This is some text. It has a citation.[^citation] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^another-citation]: My second citation. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^citation]: This is a long winded parapgraph that also has another citation.[^another-citation] -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This is some text. It has a citation.&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-citation&quot; id=&quot;fnref-citation&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-citation&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;This is a long winded parapgraph that also has another citation.&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-another-citation&quot; id=&quot;fnref-another-citation&quot; data-footnote-ref&gt;2&lt;/a&gt;&lt;/sup&gt; &lt;a href=&quot;#fnref-citation&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-another-citation&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;My second citation. &lt;a href=&quot;#fnref-another-citation&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span></pre> -<p>Footnotes are similar to, but should not be confused with, link references</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">This is some text. It has two footnotes references, side-by-side without any spaces,[^footnote1][^footnote2] which are definitely not link references. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^footnote1]: Hello. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^footnote2]: Goodbye. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This is some text. It has two footnotes references, side-by-side without any spaces,&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-footnote1&quot; id=&quot;fnref-footnote1&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-footnote2&quot; id=&quot;fnref-footnote2&quot; data-footnote-ref&gt;2&lt;/a&gt;&lt;/sup&gt; which are definitely not link references.&lt;/p&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-footnote1&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;Hello. &lt;a href=&quot;#fnref-footnote1&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-footnote2&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;Goodbye. &lt;a href=&quot;#fnref-footnote2&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span></pre> -<p>Footnotes may begin with or have a ‘w’ or a ‘_’ in their reference label.</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">This is some text. Sometimes the autolinker splits up text into multiple nodes, hoping it will find a hyperlink, so this text has a footnote whose reference label begins with a `w`.[^widely-cited] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">It has another footnote that contains many different characters (the autolinker was also breaking on `_`).[^sphinx-of-black-quartz_judge-my-vow-0123456789] -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^sphinx-of-black-quartz_judge-my-vow-0123456789]: so does this. -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^widely-cited]: this renders properly. -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;This is some text. Sometimes the autolinker splits up text into multiple nodes, hoping it will find a hyperlink, so this text has a footnote whose reference label begins with a &lt;code&gt;w&lt;/code&gt;.&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-widely-cited&quot; id=&quot;fnref-widely-cited&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;p&gt;It has another footnote that contains many different characters (the autolinker was also breaking on &lt;code&gt;_&lt;/code&gt;).&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-sphinx-of-black-quartz_judge-my-vow-0123456789&quot; id=&quot;fnref-sphinx-of-black-quartz_judge-my-vow-0123456789&quot; data-footnote-ref&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;section class=&quot;footnotes&quot; data-footnotes&gt; -</span><span style="color:#323232;">&lt;ol&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-widely-cited&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;this renders properly. &lt;a href=&quot;#fnref-widely-cited&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;li id=&quot;fn-sphinx-of-black-quartz_judge-my-vow-0123456789&quot;&gt; -</span><span style="color:#323232;">&lt;p&gt;so does this. &lt;a href=&quot;#fnref-sphinx-of-black-quartz_judge-my-vow-0123456789&quot; class=&quot;footnote-backref&quot; data-footnote-backref aria-label=&quot;Back to content&quot;&gt;↩&lt;/a&gt;&lt;/p&gt; -</span><span style="color:#323232;">&lt;/li&gt; -</span><span style="color:#323232;">&lt;/ol&gt; -</span><span style="color:#323232;">&lt;/section&gt; -</span></pre> -<p>Footnotes interacting with strikethrough should not lead to a use-after-free</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">|Tot.....[^_a_]| -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;|Tot.....[^_a_]|&lt;/p&gt; -</span></pre> -<p>Footnotes interacting with strikethrough should not lead to a use-after-free pt2</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">[^~~is~~1] -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;[^~~is~~1]&lt;/p&gt; -</span></pre> -<p>Adjacent unused footnotes definitions should not lead to a use after free</p><pre style="background-color:#ffffff;"> -<span style="color:#323232;">Hello world -</span><span style="color:#323232;"> -</span><span style="color:#323232;"> -</span><span style="color:#323232;">[^a]:[^b]: -</span><span style="color:#323232;">. -</span><span style="color:#323232;">&lt;p&gt;Hello world&lt;/p&gt; -</span></pre> -</div></html> \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/markdown/regression.md b/projects/panduck-sycamore/tests/markdown/regression.md deleted file mode 100644 index 9178a15..0000000 --- a/projects/panduck-sycamore/tests/markdown/regression.md +++ /dev/null @@ -1,368 +0,0 @@ -### Regression tests - -Issue #113: EOL character weirdness on Windows -(Important: first line ends with CR + CR + LF) - -```````````````````````````````` example -line1 - -line2 -. -<p>line1</p> -<p>line2</p> -```````````````````````````````` - -Issue #114: cmark skipping first character in line -(Important: the blank lines around "Repeatedly" contain a tab.) - -```````````````````````````````` example -By taking it apart - -- alternative solutions -→ -Repeatedly solving -→ -- how techniques -. -<p>By taking it apart</p> -<ul> -<li>alternative solutions</li> -</ul> -<p>Repeatedly solving</p> -<ul> -<li>how techniques</li> -</ul> -```````````````````````````````` - -Issue jgm/CommonMark#430: h2..h6 not recognized as block tags. - -```````````````````````````````` example -<h1>lorem</h1> - -<h2>lorem</h2> - -<h3>lorem</h3> - -<h4>lorem</h4> - -<h5>lorem</h5> - -<h6>lorem</h6> -. -<h1>lorem</h1> -<h2>lorem</h2> -<h3>lorem</h3> -<h4>lorem</h4> -<h5>lorem</h5> -<h6>lorem</h6> -```````````````````````````````` - -Issue jgm/commonmark.js#109 - tabs after setext header line - - -```````````````````````````````` example -hi ---→ -. -<h2>hi</h2> -```````````````````````````````` - -Issue #177 - incorrect emphasis parsing - -```````````````````````````````` example -a***b* c* -. -<p>a*<em><em>b</em> c</em></p> -```````````````````````````````` - -Issue #193 - unescaped left angle brackets in link destination - -```````````````````````````````` example -[a] - -[a]: <te<st> -. -<p>[a]</p> -<p>[a]: &lt;te<st></p> -```````````````````````````````` - -Issue #192 - escaped spaces in link destination - - -```````````````````````````````` example -[a](te\ st) -. -<p>[a](te\ st)</p> -```````````````````````````````` - -Issue github/github#76615: multiple delimiter combinations gets sketchy - - -```````````````````````````````` example strikethrough -~~**_`this`_**~~ -~~***`this`***~~ -~~___`this`___~~ - -**_`this`_** -***`this`*** -___`this`___ - -~~**_this_**~~ -~~***this***~~ -~~___this___~~ - -**_this_** -***this*** -___this___ -. -<p><del><strong><em><code>this</code></em></strong></del><br /> -<del><em><strong><code>this</code></strong></em></del><br /> -<del><em><strong><code>this</code></strong></em></del></p> -<p><strong><em><code>this</code></em></strong><br /> -<em><strong><code>this</code></strong></em><br /> -<em><strong><code>this</code></strong></em></p> -<p><del><strong><em>this</em></strong></del><br /> -<del><em><strong>this</strong></em></del><br /> -<del><em><strong>this</strong></em></del></p> -<p><strong><em>this</em></strong><br /> -<em><strong>this</strong></em><br /> -<em><strong>this</strong></em></p> -```````````````````````````````` - -Issue #527 - meta tags in inline contexts - -```````````````````````````````` example -City: -<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City"> - <meta itemprop="name" content="Springfield"> -</span> -. -<p>City: -<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City"> -<meta itemprop="name" content="Springfield"> -</span></p> -```````````````````````````````` - -cmark-gfm strikethrough rules - -```````````````````````````````` example strikethrough -~Hi~ Hello, world! -. -<p><del>Hi</del> Hello, world!</p> -```````````````````````````````` - -```````````````````````````````` example strikethrough -This ~text~ ~~is~~ ~~~curious~~~. -. -<p>This <del>text</del> <del>is</del> ~~~curious~~~.</p> -```````````````````````````````` - -`~` should not be escaped in href — https://github.com/github/markup/issues/311 - -```````````````````````````````` example -[x](http://members.aon.at/~nkehrer/ibm_5110/emu5110.html) -. -<p><a href="http://members.aon.at/~nkehrer/ibm_5110/emu5110.html">x</a></p> -```````````````````````````````` - -Footnotes in tables - -```````````````````````````````` example table footnotes -A footnote in a paragraph[^1] - -| Column1 | Column2 | -| --------- | ------- | -| foot [^1] | note | - -[^1]: a footnote -. -<p>A footnote in a paragraph<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup></p> -<table> -<thead> -<tr> -<th>Column1</th> -<th>Column2</th> -</tr> -</thead> -<tbody> -<tr> -<td>foot <sup class="footnote-ref"><a href="#fn-1" id="fnref-1-2" data-footnote-ref>1</a></sup></td> -<td>note</td> -</tr> -</tbody> -</table> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-1"> -<p>a footnote <a href="#fnref-1" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a> <a href="#fnref-1-2" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩<sup class="footnote-ref">2</sup></a></p> -</li> -</ol> -</section> -```````````````````````````````` - -Issue #527 - meta tags in inline contexts - -```````````````````````````````` example -City: -<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City"> - <meta itemprop="name" content="Springfield"> -</span> -. -<p>City: -<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City"> -<meta itemprop="name" content="Springfield"> -</span></p> -```````````````````````````````` - -Issue #530 - link parsing corner cases - -```````````````````````````````` example -[a](\ b) - -[a](<<b) - -[a](<b -) -. -<p>[a](\ b)</p> -<p>[a](&lt;&lt;b)</p> -<p>[a](&lt;b -)</p> -```````````````````````````````` - -Issue commonmark#526 - unescaped ( in link title - -```````````````````````````````` example -[link](url ((title)) -. -<p>[link](url ((title))</p> -```````````````````````````````` - -Issue commonamrk#517 - script, pre, style close tag without -opener. - -```````````````````````````````` example -</script> - -</pre> - -</style> -. -</script> -</pre> -</style> -```````````````````````````````` - -Issue #289. - -```````````````````````````````` example -[a](<b) c> -. -<p>[a](&lt;b) c&gt;</p> -```````````````````````````````` - -Pull request #128 - Buffer overread in tables extension - -```````````````````````````````` example table -| --| -. -<p>| --|</p> -```````````````````````````````` - -Footnotes may be nested inside other footnotes. - -```````````````````````````````` example footnotes -This is some text. It has a citation.[^citation] - -[^another-citation]: My second citation. - -[^citation]: This is a long winded parapgraph that also has another citation.[^another-citation] -. -<p>This is some text. It has a citation.<sup class="footnote-ref"><a href="#fn-citation" id="fnref-citation" data-footnote-ref>1</a></sup></p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-citation"> -<p>This is a long winded parapgraph that also has another citation.<sup class="footnote-ref"><a href="#fn-another-citation" id="fnref-another-citation" data-footnote-ref>2</a></sup> <a href="#fnref-citation" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-another-citation"> -<p>My second citation. <a href="#fnref-another-citation" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -</ol> -</section> -```````````````````````````````` - -Footnotes are similar to, but should not be confused with, link references - -```````````````````````````````` example footnotes -This is some text. It has two footnotes references, side-by-side without any spaces,[^footnote1][^footnote2] which are definitely not link references. - -[^footnote1]: Hello. - -[^footnote2]: Goodbye. -. -<p>This is some text. It has two footnotes references, side-by-side without any spaces,<sup class="footnote-ref"><a href="#fn-footnote1" id="fnref-footnote1" data-footnote-ref>1</a></sup><sup class="footnote-ref"><a href="#fn-footnote2" id="fnref-footnote2" data-footnote-ref>2</a></sup> which are definitely not link references.</p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-footnote1"> -<p>Hello. <a href="#fnref-footnote1" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-footnote2"> -<p>Goodbye. <a href="#fnref-footnote2" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -</ol> -</section> -```````````````````````````````` - -Footnotes may begin with or have a 'w' or a '_' in their reference label. - -```````````````````````````````` example footnotes autolink -This is some text. Sometimes the autolinker splits up text into multiple nodes, hoping it will find a hyperlink, so this text has a footnote whose reference label begins with a `w`.[^widely-cited] - -It has another footnote that contains many different characters (the autolinker was also breaking on `_`).[^sphinx-of-black-quartz_judge-my-vow-0123456789] - -[^sphinx-of-black-quartz_judge-my-vow-0123456789]: so does this. - -[^widely-cited]: this renders properly. -. -<p>This is some text. Sometimes the autolinker splits up text into multiple nodes, hoping it will find a hyperlink, so this text has a footnote whose reference label begins with a <code>w</code>.<sup class="footnote-ref"><a href="#fn-widely-cited" id="fnref-widely-cited" data-footnote-ref>1</a></sup></p> -<p>It has another footnote that contains many different characters (the autolinker was also breaking on <code>_</code>).<sup class="footnote-ref"><a href="#fn-sphinx-of-black-quartz_judge-my-vow-0123456789" id="fnref-sphinx-of-black-quartz_judge-my-vow-0123456789" data-footnote-ref>2</a></sup></p> -<section class="footnotes" data-footnotes> -<ol> -<li id="fn-widely-cited"> -<p>this renders properly. <a href="#fnref-widely-cited" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -<li id="fn-sphinx-of-black-quartz_judge-my-vow-0123456789"> -<p>so does this. <a href="#fnref-sphinx-of-black-quartz_judge-my-vow-0123456789" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> -</li> -</ol> -</section> -```````````````````````````````` - -Footnotes interacting with strikethrough should not lead to a use-after-free - -```````````````````````````````` example footnotes autolink strikethrough table -|Tot.....[^_a_]| -. -<p>|Tot.....[^_a_]|</p> -```````````````````````````````` - -Footnotes interacting with strikethrough should not lead to a use-after-free pt2 - -```````````````````````````````` example footnotes autolink strikethrough table -[^~~is~~1] -. -<p>[^~~is~~1]</p> -```````````````````````````````` - -Adjacent unused footnotes definitions should not lead to a use after free - -```````````````````````````````` example footnotes autolink strikethrough table -Hello world - - -[^a]:[^b]: -. -<p>Hello world</p> -```````````````````````````````` \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/rst/Readme.md b/projects/panduck-sycamore/tests/rst/Readme.md deleted file mode 100644 index 3a4e68b..0000000 --- a/projects/panduck-sycamore/tests/rst/Readme.md +++ /dev/null @@ -1 +0,0 @@ -https://3vshej.cn/rstSyntax/ \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/rst/example.html b/projects/panduck-sycamore/tests/rst/example.html deleted file mode 100644 index 8c2fa5c..0000000 --- a/projects/panduck-sycamore/tests/rst/example.html +++ /dev/null @@ -1,176 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><value>Null</value><p><h1>Example .rst File</h1><p>If you work with edX documentation source files, you might find this file helpful as a reference. This file contains examples of .rst formatting.</p><p>Explanations and more context for each type of element are provided in :ref:`Work with edX Documentation Source Files`.</p><p>This file covers the following topics.</p><value>Null</value><p> :local: :depth: 1</p><p><h1>Heading Levels</h1><p>############# -Heading 1 -############# - -************* -Heading 2 -************* - -=========== -Heading 3 -=========== - -Heading 4 -************ - -Heading 5 -=========== - -Heading 6 -~~~~~~~~~~~ -</p></p><p><h1>Paragraph Text and Commented Text</h1><p>This is an example of regular text in paragraph form. There are no indents. As a best practice, break lines at about 80 characters, so that each line has its own line number for commenting in reviews.</p><value>Null</value><p>Boldface is used for labels that are visible in the user interface. The UI text is surrounded by double asterisks. For example, <strong>bold</strong>.</p><p>Italics are rarely used. Text surrounded by single asterisks is rendered in <em>italics</em>.</p><p>Monospace text is used for code examples. Text surrounded by double grave accent characters is rendered in monospace font.</p><p>.. comments can be added in a file by starting a line with 2 periods and a space.</p><p>In English source files, look for comments addressed to translators from writers.</p><p>.. Translators: In this code example, do not translate such and such.</p></p><p><h1>Ordered and Unordered Lists</h1><p>Use hash symbols for ordered lists.</p><p>::</p><p>#. Select <strong>Advanced Settings</strong>. #. Find the <strong>Course Advertised Start Date</strong> policy key. #. Enter the value you want to display.</p><value>Null</value><p> Ordered lists usually use numerals. Nested ordered lists (ordered lists inside other ordered lists) use letters.</p><p>Use asterisks for unordered (bulleted) lists.</p><p>::</p><value>Null</value><p><h1>Nested Lists or Content</h1><p>You can include content including additional lists and code examples inside lists.</p><p><h1>Unordered List inside Ordered List</h1><p>To include an unordered list inside an ordered list, indent the unordered list three spaces. The first bullet in the unordered list must be flush with the text in the ordered list.</p><p>#. Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - * In this example, the key for the Annotation Problem tool is the only - value in the list. - - * In this example, the key for the Annotation Problem tool is added at - the beginning of a list of other keys. - -#. Select **Save Changes**. -</p><img src="/Images/Lists_UL_inside_OL.png"/><p> :width: 500 :alt: An unordered (bulleted) list inside an ordered (numbered) list.</p></p><p><h1>Ordered List inside Unordered List</h1><p>To include an ordered list inside an unordered list, indent the ordered list two spaces. The first number or letter of the ordered list must be flush with the text in the unordered list.</p><p>* Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be comma - separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at the - beginning of a list of other keys. - -* Select **Save Changes**. -</p><value>Null</value><value>Null</value><value>Null</value></p><p><h1>Unordered List inside Unordered List</h1><p>To include an unordered list inside another unordered list, indent the second unordered list two spaces. The first bullet of the second unordered list must be flush with the text in the unordered list.</p><p>* Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at the - beginning of a list of other keys. - -* Select **Save Changes**. -</p><img src="/Images/Lists_UL_inside_UL.png"/><p> :width: 500 :alt: An ordered (numbered) list inside an unordered (bulleted) list.</p></p><p><h1>Ordered List inside Ordered List</h1><p>To include another ordered list inside an ordered list, indent the second ordered list three spaces. The second ordered list must be flush with the text in the numbered list. The first ordered list uses numerals, and the second uses letters.</p><p>#. Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at - the beginning of a list of other keys. - -#. Select **Save Changes**. -</p><value>Null</value><value>Null</value><value>Null</value></p><p><h1>Code, Images, and Other Content inside Lists</h1><p>To include content such as code or an image inside a list, position the code or image directive flush with the text in the list. That is, indent three spaces for ordered lists and two spaces for unordered lists.</p><p>#. In the ``lms.yml`` and ``studio.yml`` files, set the value of - ``CERTIFICATES_HTML_VIEW`` within the ``FEATURES`` object to ``true``. - - .. code-block:: bash - - "FEATURES": { - ... - 'CERTIFICATES_HTML_VIEW': true, - ... - } - -#. Save the ``lms.yml`` and ``studio.yml`` files. -</p></p></p></p><p><h1>Conditional Text</h1><p>To conditionalize a single paragraph, use either the only:: Partners or the only:: Open_edX directive, and indent the paragraph under the directive. You can add the conditional text as regular text or as a note.</p><p>Make sure to indent the paragraph under the directive.</p><p>.. only:: Partners - - Data about course enrollment is available from edX Insights. You can access - Insights from the instructor dashboard for your live course: after you select - **Instructor**, follow the link in the banner at the top of each page. For - more information, see `Using edX Insights`_. - -.. only:: Open_edX - - .. note:: - If you want to require an entrance exam for your course, you also create - the exam in the course outline. Before you can create an exam, you must - set your course to require an entrance exam in Studio. For more - information, see :ref:`Require an Entrance Exam`. -</p><p>To conditionalize more than a paragraph, use either the only:: Partners or the only:: Open_edX directive, and then use an include:: directive indented under the only directive.</p><p>.. only:: Open_edX - - .. include:: ../../../shared/building_and_running_chapters/running_course/Section_course_student.rst -</p></p><p><h1>Notes and Warnings</h1><p>.. note:: - This is note text. If note text runs over a line, make sure the lines wrap - and are indented to the same level as the note tag. If formatting is - incorrect, part of the note might not render in the HTML output. - - Notes can have more than one paragraph. Successive paragraphs must indent - to the same level as the rest of the note. -</p><value>Null</value><p> Notes can have more than one paragraph. Successive paragraphs must indent to the same level as the rest of the note.</p><p>.. warning:: - Warnings are formatted in the same way as notes. In the same way, lines - must be broken and indented under the warning tag. -</p><value>Null</value></p><p><h1>Cross-References</h1><p>In edX documents, you can include cross-references to other locations in the same edX document, to locations in other edX documents (such as a cross- reference from a location in the <em>Building and Running an edX Course</em> guide to a location in the <em>EdX Learner's Guide</em>), to JIRA stories, and to external websites. In this section, "EdX documents" refers to the resources, including guides and tutorials, that are listed on docs.edx.org.</p><p>For more information about creating cross-references using RST and Sphinx, see <value>Null</value> in the online Sphinx documentation.</p><p><h1>Cross-References to Locations in the Same Document</h1><p>Cross-references to locations in the same document use anchors that are located above the heading for each topic or section. Anchors can contain numbers, letters, spaces, underscores, and hyphens, but cannot include punctuation. Anchors use the following syntax.</p><p>.. _Anchor Text: -</p><p>The following example shows an anchor for a section, followed by the heading for that section. SFD SN Keyboard Shortcuts is the anchor text.</p><p>.. _SFD SN Keyboard Shortcuts: - -****************************** -Keyboard Shortcuts for Notes -****************************** -</p><p>To create cross-references to locations in the same document, you can use the anchor only, or you can use your own text. The anchor text is never visible in output. It is replaced by the text of the heading that follows the anchor or the text that you specify.</p><p><h1>Cross-References Using the Anchor Only</h1><p>To add a cross-reference to a specific location in a document and use the text of the heading for that location as link text, use :ref:`Anchor Text` syntax, as in the following example.</p><p>For more information about using keyboard shortcuts, see :ref:`SFD SN -Keyboard Shortcuts`. -</p><p>In this example, "SFD SN Keyboard Shortcuts" is the anchor text for a section that is titled "Keyboard Shortcuts for Notes". Readers will see the following text, and "Keyboard Shortcuts for Notes" will be an active link.</p><p>For more information about using keyboard shortcuts, see Keyboard Shortcuts -for Notes. -</p></p><p><h1>Cross-References Using Specified Link Text</h1><p>For internal cross-references that use text other than the heading for the section that you're linking to, use :ref:`specified text&lt;Anchor Text>` syntax, as in the following example.</p><p>If you want to, you can use :ref:`keyboard shortcuts&lt;SFD SN Keyboard -Shortcuts>` to create, edit, and view notes. -</p><value>Null</value><p> Do not include a space between the last word of the link text and the opening angle bracket for the anchor text.</p><p>In this example, "keyboard shortcuts" is the link text, and "SFD SN Keyboard Shortcuts" is the anchor text for a section that is titled "Keyboard Shortcuts for Notes". Readers will see the following text, and "keyboard shortcuts" will be an active link.</p><p>If you want to, you can use keyboard shortcuts to create, edit, and view your -notes. -</p></p></p><p><h1>Cross-References to Locations in Different edX Documents</h1><p>You can create cross-references between different edX documents. For example, you can create a link in <em>Building and Running an edX Course</em> to a topic in the <em>EdX Learner's Guide</em>. To do this, you use the intersphinx map ID of the document that you want to link to and the anchor text for the section you want. The cross-reference uses the following syntax.</p><p>:ref:`intersphinx_map_ID:Anchor Name` -</p><p>For example:</p><p>:ref:`partnercoursestaff:Release Dates` -</p><p>To find the intersphinx map ID for the document that you want, follow these steps.</p><p>#. Open the conf.py file in the <value>Null</value> folder, and then locate the following line.</p><p> intersphinx_mapping = {</p><p>#. In the list that follows this line, find the ID for the document that you want. The text between the single quotation marks (') at the beginning of each line is the intersphinx map ID for the document.</p><p>The following intersphinx map IDs are the most frequently used.</p><value>Null</value><p> * - Map ID - Document * - partnercoursestaff - <em>Building and Running an edX Course</em> * - opencoursestaff - <em>Building and Running an Open edX Course</em> * - learners - <em>EdX Learner's Guide</em> * - openlearners - <em>Open edX Learner's Guide</em> * - data - <em>EdX Research Guide</em> * - insights - <em>Using edX Insights</em> * - installation - <em>Installing, Configuring, and Running the Open edX Platform</em> * - opendevelopers - <em>Open edX Developer's Guide</em> * - partnerreleasenotes - Partner release notes * - openreleasenotes - Open edX release notes</p></p><p><h1>Cross-References to JIRA</h1><p>For cross-references to JIRA tickets, use the :jira:`PROJECT-ticketnumber` syntax, as in the following example.</p><p>For more information, see :jira:`DOC-2316`. -</p><p>Note that jira replaces ref for these links.</p><p>Readers will see the following text, and "DOC-2316" will be an active link.</p><p>For more information, see DOC-2316.</p></p><p><h1>Cross-References to External Web Pages</h1><p>A cross-reference to an external web page has several elements.</p><value>Null</value><value>Null</value><p>To create an external cross-reference, follow these steps.</p><p>#. In the paragraph where you want the cross-reference, add the text that you want to use for the link, formatted as follows (where "Release Pages" is the link text). This creates an anchor out of that text.</p><p> ::</p><p> The edX engineering wiki <value>Null</value> provide access to detailed information about every change made to the edx-platform GitHub repository.</p><p>#. In the file that contains the cross-reference, add an include directive for the edx-documentation/en_us/links/links.rst file if one does not already exist. These include directives are typically at the end of the file.</p><p> ::</p><p> .. include:: ../../links/links.rst</p><p> .. note::</p><p> The path to the links.rst file depends on the location of the file where you are creating the link. For example, the path might be ../../../links/links.rst or ../links/links.rst.</p><p>#. In the edx-documentation/en_us/links/links.rst file, add an entry for the anchor text and the URL of the external website, formatted as follows. Make sure that the anchor text in this file matches the anchor text in the file that contains the cross-reference exactly, including capitalization.</p><p> ::</p><p> .. _Release Pages: <value>Null</value></p><p>Readers will see the following text. "Release Pages" will be an active link.</p><p>The edX engineering wiki Release Pages provide access to detailed -information about every change made to the edx-platform GitHub -repository. -</p></p></p><p><h1>Image References</h1><p><h1>Image references look like this.</h1><p> .. image:: /Images/Course_Outline_LMS.png :width: 100 :alt: A screen capture showing the elements of the course outline in the LMS.</p><p>Image links can include optional specifications such as height, width, or scale. Alternative text for screen readers is required for each image. Provide text that is useful to someone who might not be able to see the image.</p><value>Null</value></p></p><p><h1>Tables</h1><p>Each example in this section shows the raw formatting for the table followed by the table as it would render (if you are viewing this file as part of the Style Guide).</p><p><h1>Example of a table with an empty cell</h1><p><h1>The empty cell is the second column in the first row of this table.</h1><p> .. list-table:: :widths: 25 25 50</p><p> * - Annotation Problem - - Annotation problems ask students to respond to questions about a specific block of text. The question appears above the text when the student hovers the mouse over the highlighted text so that students can think about the question as they read. * - Example Poll - Conditional Module - You can create a conditional module to control versions of content that groups of students see. For example, students who answer "Yes" to a poll question then see a different block of text from the students who answer "No" to that question. * - Example JavaScript Problem - Custom JavaScript - Custom JavaScript display and grading problems (also called *custom JavaScript problems* or <em>JS input problems</em>) allow you to create a custom problem or tool that uses JavaScript and then add the problem or tool directly into Studio.</p><value>Null</value></p></p><p><h1>Example of a table with a header row</h1><p>.. list-table:: - :widths: 15 15 70 - :header-rows: 1 - - * - First Name - - Last Name - - Residence - * - Elizabeth - - Bennett - - Longbourne - * - Fitzwilliam - - Darcy - - Pemberley -</p><value>Null</value></p><p><h1>Example of a table with a boldface first column</h1><p>.. list-table:: - :widths: 15 15 70 - :stub-columns: 1 - - * - First Name - - Elizabeth - - Fitzwilliam - * - Last Name - - Bennett - - Darcy - * - Residence - - Longboure - - Pemberley -</p><value>Null</value></p><p><h1>Example of a table with a cell that includes an unordered list</h1><p>The blank lines before and after the unordered list are critical for the list to render correctly.</p><p>.. list-table:: - :widths: 15 15 60 - :header-rows: 1 - - * - Field - - Type - - Details - * - ``correct_map`` - - dict - - For each problem ID value listed by ``answers``, provides: - - * ``correctness``: string; 'correct', 'incorrect' - * ``hint``: string; Gives optional hint. Nulls allowed. - * ``hintmode``: string; None, 'on_request', 'always'. Nulls allowed. - * ``msg``: string; Gives extra message response. - * ``npoints``: integer; Points awarded for this ``answer_id``. Nulls allowed. - * ``queuestate``: dict; None when not queued, else ``{key:'', time:''}`` - where ``key`` is a secret string dump of a DateTime object in the form - '%Y%m%d%H%M%S'. Nulls allowed. - - * - ``grade`` - - integer - - Current grade value. - * - ``max_grade`` - - integer - - Maximum possible grade value. -</p><value>Null</value></p></p><p><h1>Code Formatting</h1><p><h1>Inline code</h1><p>In inline text, any text can be formatted as code (monospace font) by enclosing the selection within a pair of double "grave accent" characters (`). For example, ``these words`` are formatted in a monospace font when the documentation is output as PDF or HTML.</p></p><p><h1>Code blocks</h1><p>To set text in a code block, end the previous paragaph with 2 colons, leave one line before the intended code block, and make sure the code block is indented beyond the first colon. ::</p><p> For example, this is the introductory paragraph ::</p><p> &lt;p>and this is the code block following.&lt;/p></p><p>Alternatively, use the code-block tag. Optionally, indicate the type of code after the 2 colons in the tag, which results in the tags within the code block being displayed in different colors. ::</p><p> .. code-block:: xml</p><p> &lt;problem> &lt;annotationresponse> &lt;annotationinput> &lt;text>PLACEHOLDER: Text of annotation&lt;/text> &lt;comment>PLACEHOLDER: Text of question&lt;/comment> &lt;comment_prompt>PLACEHOLDER: Type your response below:&lt;/comment_prompt> &lt;tag_prompt>PLACEHOLDER: In your response to this question, which tag below do you choose?&lt;/tag_prompt> &lt;options> &lt;option choice="incorrect">PLACEHOLDER: Incorrect answer (to make this option a correct or partially correct answer, change choice="incorrect" to choice="correct" or choice="partially-correct")&lt;/option> &lt;option choice="correct">PLACEHOLDER: Correct answer (to make this option an incorrect or partially correct answer, change choice="correct" to choice="incorrect" or choice="partially-correct")&lt;/option> &lt;option choice="partially-correct">PLACEHOLDER: Partially correct answer (to make this option a correct or partially correct answer, change choice="partially-correct" to choice="correct" or choice="incorrect") &lt;/option> &lt;/options> &lt;/annotationinput> &lt;/annotationresponse> &lt;solution> &lt;p>PLACEHOLDER: Detailed explanation of solution&lt;/p> &lt;/solution> &lt;/problem></p><value>Null</value></p></p></p></div></html> \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/rst/example.rst b/projects/panduck-sycamore/tests/rst/example.rst deleted file mode 100644 index f99b7e2..0000000 --- a/projects/panduck-sycamore/tests/rst/example.rst +++ /dev/null @@ -1,808 +0,0 @@ -.. _Anchor For ExampleRSTFile: - -################# -Example .rst File -################# - -If you work with edX documentation source files, you might find this file -helpful as a reference. This file contains examples of .rst formatting. - -Explanations and more context for each type of element are provided in -:ref:`Work with edX Documentation Source Files`. - -This file covers the following topics. - -.. contents:: - :local: - :depth: 1 - -*************** -Heading Levels -*************** - -:: - - ############# - Heading 1 - ############# - - ************* - Heading 2 - ************* - - =========== - Heading 3 - =========== - - Heading 4 - ************ - - Heading 5 - =========== - - Heading 6 - ~~~~~~~~~~~ - -************************************************ -Paragraph Text and Commented Text -************************************************ - -This is an example of regular text in paragraph form. There are no indents. As -a best practice, break lines at about 80 characters, so that each line has its -own line number for commenting in reviews. - -.. warning:: Throughout text and code examples, make sure double quotation - marks and apostrophes are straight (") or ('), not curly quotatation marks - and apostrophes, which might be introduced when text is cut and pasted from - other sources or editors. - -Boldface is used for labels that are visible in the user interface. The UI -text is surrounded by double asterisks. For example, **bold**. - -Italics are rarely used. Text surrounded by single asterisks is rendered in -*italics*. - -Monospace text is used for ``code examples``. Text surrounded by double grave -accent characters is rendered in monospace font. - -``.. comments can be added in a file by starting a line with 2 periods and a space.`` - -In English source files, look for comments addressed to translators from writers. - -``.. Translators: In this code example, do not translate such and such.`` - - -*************************************** -Ordered and Unordered Lists -*************************************** - -Use hash symbols for ordered lists. - -:: - -#. Select **Advanced Settings**. -#. Find the **Course Advertised Start Date** policy key. -#. Enter the value you want to display. - -.. note:: - Ordered lists usually use numerals. Nested ordered lists (ordered lists inside - other ordered lists) use letters. - -Use asterisks for unordered (bulleted) lists. - -:: - -* Who is teaching the course? -* What university or college is the course affiliated with? -* What topics and concepts are covered in your course? -* Why should a learner enroll in your course? - -======================= -Nested Lists or Content -======================= - -You can include content including additional lists and code examples inside -lists. - -Unordered List inside Ordered List -*************************************** - -To include an unordered list inside an ordered list, indent the unordered list -three spaces. The first bullet in the unordered list must be flush with the -text in the ordered list. - -:: - - #. Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - * In this example, the key for the Annotation Problem tool is the only - value in the list. - - * In this example, the key for the Annotation Problem tool is added at - the beginning of a list of other keys. - - #. Select **Save Changes**. - -.. image:: /Images/Lists_UL_inside_OL.png - :width: 500 - :alt: An unordered (bulleted) list inside an ordered (numbered) list. - -Ordered List inside Unordered List -*************************************** - -To include an ordered list inside an unordered list, indent the ordered list -two spaces. The first number or letter of the ordered list must be flush with -the text in the unordered list. - -:: - - * Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be comma - separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at the - beginning of a list of other keys. - - * Select **Save Changes**. - -.. There isn't a screen shot of the above example yet because these lists don't -.. render correctly locally, and searching for an example in the built docs -.. online was taking too much time. - -Unordered List inside Unordered List -*************************************** - -To include an unordered list inside another unordered list, indent the second -unordered list two spaces. The first bullet of the second unordered list must -be flush with the text in the unordered list. - -:: - - * Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at the - beginning of a list of other keys. - - * Select **Save Changes**. - -.. image:: /Images/Lists_UL_inside_UL.png - :width: 500 - :alt: An ordered (numbered) list inside an unordered (bulleted) list. - -Ordered List inside Ordered List -*************************************** - -To include another ordered list inside an ordered list, indent the second -ordered list three spaces. The second ordered list must be flush with the text -in the numbered list. The first ordered list uses numerals, and the second -uses letters. - -:: - - #. Review your entry to verify that the key is accurate and that it is - surrounded by quotation marks. If there is a list of keys, they must be - comma separated. - - #. In this example, the key for the Annotation Problem tool is the only - value in the list. - - #. In this example, the key for the Annotation Problem tool is added at - the beginning of a list of other keys. - - #. Select **Save Changes**. - -.. There isn't a screen shot of the above example yet because these lists don't -.. render correctly locally, and searching for an example in the built docs -.. online was taking too much time. - -Code, Images, and Other Content inside Lists -********************************************* - -To include content such as code or an image inside a list, position the code or -image directive flush with the text in the list. That is, indent three spaces -for ordered lists and two spaces for unordered lists. - -:: - - #. In the ``lms.yml`` and ``studio.yml`` files, set the value of - ``CERTIFICATES_HTML_VIEW`` within the ``FEATURES`` object to ``true``. - - .. code-block:: bash - - "FEATURES": { - ... - 'CERTIFICATES_HTML_VIEW': true, - ... - } - - #. Save the ``lms.yml`` and ``studio.yml`` files. - - -*************************************** -Conditional Text -*************************************** - -To conditionalize a single paragraph, use either the ``only:: Partners`` or -the ``only:: Open_edX`` directive, and indent the paragraph under the -directive. You can add the conditional text as regular text or as a note. - -Make sure to indent the paragraph under the directive. - -:: - - .. only:: Partners - - Data about course enrollment is available from edX Insights. You can access - Insights from the instructor dashboard for your live course: after you select - **Instructor**, follow the link in the banner at the top of each page. For - more information, see `Using edX Insights`_. - - .. only:: Open_edX - - .. note:: - If you want to require an entrance exam for your course, you also create - the exam in the course outline. Before you can create an exam, you must - set your course to require an entrance exam in Studio. For more - information, see :ref:`Require an Entrance Exam`. - -To conditionalize more than a paragraph, use either the ``only:: Partners`` or -the ``only:: Open_edX`` directive, and then use an ``include::`` directive -indented under the only directive. - -:: - - .. only:: Open_edX - - .. include:: ../../../shared/building_and_running_chapters/running_course/Section_course_student.rst - - - -********************************* -Notes and Warnings -********************************* - -:: - - .. note:: - This is note text. If note text runs over a line, make sure the lines wrap - and are indented to the same level as the note tag. If formatting is - incorrect, part of the note might not render in the HTML output. - - Notes can have more than one paragraph. Successive paragraphs must indent - to the same level as the rest of the note. - -.. note:: - This is note text. If note text runs over a line, make sure the lines wrap - and are indented to the same level as the note tag. If formatting is - incorrect, part of the note might not render in the HTML output. - - Notes can have more than one paragraph. Successive paragraphs must indent to - the same level as the rest of the note. - - -:: - - .. warning:: - Warnings are formatted in the same way as notes. In the same way, lines - must be broken and indented under the warning tag. - - -.. warning:: - Warnings are formatted in the same way as notes. In the same way, lines must - be broken and indented under the warning tag. - - -**************************** -Cross-References -**************************** - -In edX documents, you can include cross-references to other locations in the -same edX document, to locations in other edX documents (such as a cross- -reference from a location in the *Building and Running an edX Course* guide to -a location in the *EdX Learner's Guide*), to JIRA stories, and to external -websites. In this section, "EdX documents" refers to the resources, including -guides and tutorials, that are listed on docs.edx.org. - -For more information about creating cross-references using RST and Sphinx, see -`Cross-referencing arbitrary locations`_ in the online Sphinx documentation. - -================================================== -Cross-References to Locations in the Same Document -================================================== - -Cross-references to locations in the same document use anchors that are located -above the heading for each topic or section. Anchors can contain numbers, -letters, spaces, underscores, and hyphens, but cannot include punctuation. -Anchors use the following syntax. - -:: - - .. _Anchor Text: - -The following example shows an anchor for a section, followed by the heading -for that section. ``SFD SN Keyboard Shortcuts`` is the anchor text. - -:: - - .. _SFD SN Keyboard Shortcuts: - - ****************************** - Keyboard Shortcuts for Notes - ****************************** - -To create cross-references to locations in the same document, you can use the -anchor only, or you can use your own text. The anchor text is never visible in -output. It is replaced by the text of the heading that follows the anchor or -the text that you specify. - -Cross-References Using the Anchor Only -******************************************** - -To add a cross-reference to a specific location in a document and use the text -of the heading for that location as link text, use ``:ref:`Anchor Text``` -syntax, as in the following example. - -:: - - For more information about using keyboard shortcuts, see :ref:`SFD SN - Keyboard Shortcuts`. - -In this example, "SFD SN Keyboard Shortcuts" is the anchor text for a section -that is titled "Keyboard Shortcuts for Notes". Readers will see the following -text, and "Keyboard Shortcuts for Notes" will be an active link. - -:: - - For more information about using keyboard shortcuts, see Keyboard Shortcuts - for Notes. - -Cross-References Using Specified Link Text -******************************************* - -For internal cross-references that use text other than the heading for the -section that you're linking to, use ``:ref:`specified text<Anchor Text>``` -syntax, as in the following example. - -:: - - If you want to, you can use :ref:`keyboard shortcuts<SFD SN Keyboard - Shortcuts>` to create, edit, and view notes. - -.. note:: - Do not include a space between the last word of the link text and the opening - angle bracket for the anchor text. - -In this example, "keyboard shortcuts" is the link text, and "SFD SN Keyboard -Shortcuts" is the anchor text for a section that is titled "Keyboard Shortcuts -for Notes". Readers will see the following text, and "keyboard shortcuts" will -be an active link. - -:: - - If you want to, you can use keyboard shortcuts to create, edit, and view your - notes. - -========================================================== -Cross-References to Locations in Different edX Documents -========================================================== - -You can create cross-references between different edX documents. For example, -you can create a link in *Building and Running an edX Course* to a topic in the -*EdX Learner's Guide*. To do this, you use the intersphinx map ID of the -document that you want to link to and the anchor text for the section you want. -The cross-reference uses the following syntax. - -:: - - :ref:`intersphinx_map_ID:Anchor Name` - -For example: - -:: - - :ref:`partnercoursestaff:Release Dates` - -To find the intersphinx map ID for the document that you want, follow these -steps. - -#. Open the conf.py file in the `edx-documentation/shared`_ folder, and then - locate the following line. - - ``intersphinx_mapping = {`` - -#. In the list that follows this line, find the ID for the document that you - want. The text between the single quotation marks (') at the beginning of - each line is the intersphinx map ID for the document. - -The following intersphinx map IDs are the most frequently used. - -.. list-table:: - :widths: 25 25 50 - - * - Map ID - - Document - * - ``partnercoursestaff`` - - *Building and Running an edX Course* - * - ``opencoursestaff`` - - *Building and Running an Open edX Course* - * - ``learners`` - - *EdX Learner's Guide* - * - ``openlearners`` - - *Open edX Learner's Guide* - * - ``data`` - - *EdX Research Guide* - * - ``insights`` - - *Using edX Insights* - * - ``installation`` - - *Installing, Configuring, and Running the Open edX Platform* - * - ``opendevelopers`` - - *Open edX Developer's Guide* - * - ``partnerreleasenotes`` - - Partner release notes - * - ``openreleasenotes`` - - Open edX release notes - -============================================ -Cross-References to JIRA -============================================ - -For cross-references to JIRA tickets, use the ``:jira:`PROJECT-ticketnumber``` -syntax, as in the following example. - -:: - - For more information, see :jira:`DOC-2316`. - -Note that ``jira`` replaces ``ref`` for these links. - -Readers will see the following text, and "DOC-2316" will be an active link. - -``For more information, see DOC-2316.`` - -============================================ -Cross-References to External Web Pages -============================================ - -A cross-reference to an external web page has several elements. - -* The URL of the external web page. -* The text to use for the cross-reference. This text becomes an anchor in the - file that contains the cross-reference. -* An ``include`` directive in the file that contains the cross-reference to the - links.rst file that is located in the ``edx-documentation/en_us/links/`` - folder. -* An entry in the links.rst file. - -To create an external cross-reference, follow these steps. - -#. In the paragraph where you want the cross-reference, add the text that you - want to use for the link, formatted as follows (where "Release Pages" is the - link text). This creates an anchor out of that text. - - :: - - The edX engineering wiki `Release Pages`_ provide access to detailed - information about every change made to the edx-platform GitHub - repository. - -#. In the file that contains the cross-reference, add an ``include`` directive - for the ``edx-documentation/en_us/links/links.rst`` file if one does not - already exist. These ``include`` directives are typically at the end of the - file. - - :: - - .. include:: ../../links/links.rst - - .. note:: - - The path to the links.rst file depends on the location of the file where - you are creating the link. For example, the path might be - ``../../../links/links.rst`` or ``../links/links.rst``. - -#. In the ``edx-documentation/en_us/links/links.rst`` file, add an entry for - the anchor text and the URL of the external website, formatted as follows. - Make sure that the anchor text in this file matches the anchor text in the - file that contains the cross-reference exactly, including capitalization. - - :: - - .. _Release Pages: https://openedx.atlassian.net/wiki/display/ENG/Release+Pages - -Readers will see the following text. "Release Pages" will be an active link. - -:: - - The edX engineering wiki Release Pages provide access to detailed - information about every change made to the edx-platform GitHub - repository. - - -**************************** -Image References -**************************** - -Image references look like this. -:: - - .. image:: /Images/Course_Outline_LMS.png - :width: 100 - :alt: A screen capture showing the elements of the course outline in the LMS. - - -Image links can include optional specifications such as height, width, or -scale. Alternative text for screen readers is required for each image. Provide -text that is useful to someone who might not be able to see the image. - - -.. _Examples of Tables: - -************************************ -Tables -************************************ - -Each example in this section shows the raw formatting for the table followed -by the table as it would render (if you are viewing this file as part of the -Style Guide). - -====================================== -Example of a table with an empty cell -====================================== - -The empty cell is the second column in the first row of this table. -:: - - .. list-table:: - :widths: 25 25 50 - - * - Annotation Problem - - - - Annotation problems ask students to respond to questions about a - specific block of text. The question appears above the text when the - student hovers the mouse over the highlighted text so that students can - think about the question as they read. - * - Example Poll - - Conditional Module - - You can create a conditional module to control versions of content that - groups of students see. For example, students who answer "Yes" to a - poll question then see a different block of text from the students who - answer "No" to that question. - * - Example JavaScript Problem - - Custom JavaScript - - Custom JavaScript display and grading problems (also called *custom - JavaScript problems* or *JS input problems*) allow you to create a - custom problem or tool that uses JavaScript and then add the problem or - tool directly into Studio. - -.. list-table:: - :widths: 25 25 50 - - * - Annotation Problem - - - - Annotation problems ask students to respond to questions about a - specific block of text. The question appears above the text when the - student hovers the mouse over the highlighted text so that students can - think about the question as they read. - * - Example Poll - - Conditional Module - - You can create a conditional module to control versions of content that - groups of students see. For example, students who answer "Yes" to a - poll question then see a different block of text from the students who - answer "No" to that question. - * - Exampel JavaScript Problem - - Custom JavaScript - - Custom JavaScript display and grading problems (also called *custom - JavaScript problems* or *JS input problems*) allow you to create a - custom problem or tool that uses JavaScript and then add the problem or - tool directly into Studio. - -==================================== -Example of a table with a header row -==================================== - -:: - - .. list-table:: - :widths: 15 15 70 - :header-rows: 1 - - * - First Name - - Last Name - - Residence - * - Elizabeth - - Bennett - - Longbourne - * - Fitzwilliam - - Darcy - - Pemberley - - -.. list-table:: - :widths: 15 15 70 - :header-rows: 1 - - * - First Name - - Last Name - - Residence - * - Elizabeth - - Bennett - - Longbourne - * - Fitzwilliam - - Darcy - - Pemberley - - -=============================================== -Example of a table with a boldface first column -=============================================== - -:: - - .. list-table:: - :widths: 15 15 70 - :stub-columns: 1 - - * - First Name - - Elizabeth - - Fitzwilliam - * - Last Name - - Bennett - - Darcy - * - Residence - - Longboure - - Pemberley - - -.. list-table:: - :widths: 15 15 70 - :stub-columns: 1 - - * - First Name - - Elizabeth - - Fitzwilliam - * - Last Name - - Bennett - - Darcy - * - Residence - - Longboure - - Pemberley - -============================================================== -Example of a table with a cell that includes an unordered list -============================================================== - -The blank lines before and after the unordered list are critical for the list -to render correctly. - -:: - - .. list-table:: - :widths: 15 15 60 - :header-rows: 1 - - * - Field - - Type - - Details - * - ``correct_map`` - - dict - - For each problem ID value listed by ``answers``, provides: - - * ``correctness``: string; 'correct', 'incorrect' - * ``hint``: string; Gives optional hint. Nulls allowed. - * ``hintmode``: string; None, 'on_request', 'always'. Nulls allowed. - * ``msg``: string; Gives extra message response. - * ``npoints``: integer; Points awarded for this ``answer_id``. Nulls allowed. - * ``queuestate``: dict; None when not queued, else ``{key:'', time:''}`` - where ``key`` is a secret string dump of a DateTime object in the form - '%Y%m%d%H%M%S'. Nulls allowed. - - * - ``grade`` - - integer - - Current grade value. - * - ``max_grade`` - - integer - - Maximum possible grade value. - - -.. list-table:: - :widths: 15 15 60 - :header-rows: 1 - - * - Field - - Type - - Details - * - ``correct_map`` - - dict - - For each problem ID value listed by ``answers``, provides: - - * ``correctness``: string; 'correct', 'incorrect' - * ``hint``: string; Gives optional hint. Nulls allowed. - * ``hintmode``: string; None, 'on_request', 'always'. Nulls allowed. - * ``msg``: string; Gives extra message response. - * ``npoints``: integer; Points awarded for this ``answer_id``. Nulls allowed. - * ``queuestate``: dict; None when not queued, else ``{key:'', time:''}`` - where ``key`` is a secret string dump of a DateTime object in the form - '%Y%m%d%H%M%S'. Nulls allowed. - - * - ``grade`` - - integer - - Current grade value. - * - ``max_grade`` - - integer - - Maximum possible grade value. - - -***************** -Code Formatting -***************** - -=========== -Inline code -=========== - -In inline text, any text can be formatted as code (monospace font) by -enclosing the selection within a pair of double "grave accent" characters (`). -For example, ````these words```` are formatted in a monospace font when the -documentation is output as PDF or HTML. - -=========== -Code blocks -=========== - - -To set text in a code block, end the previous paragaph with 2 colons, leave -one line before the intended code block, and make sure the code block is -indented beyond the first colon. -:: - - For example, this is the introductory paragraph - :: - - <p>and this is the code block following.</p> - - -Alternatively, use the code-block tag. Optionally, indicate the type of code -after the 2 colons in the tag, which results in the tags within the code block -being displayed in different colors. -:: - - .. code-block:: xml - - <problem> - <annotationresponse> - <annotationinput> - <text>PLACEHOLDER: Text of annotation</text> - <comment>PLACEHOLDER: Text of question</comment> - <comment_prompt>PLACEHOLDER: Type your response below:</comment_prompt> - <tag_prompt>PLACEHOLDER: In your response to this question, which tag below - do you choose?</tag_prompt> - <options> - <option choice="incorrect">PLACEHOLDER: Incorrect answer (to make this - option a correct or partially correct answer, change choice="incorrect" - to choice="correct" or choice="partially-correct")</option> - <option choice="correct">PLACEHOLDER: Correct answer (to make this option - an incorrect or partially correct answer, change choice="correct" to - choice="incorrect" or choice="partially-correct")</option> - <option choice="partially-correct">PLACEHOLDER: Partially correct answer - (to make this option a correct or partially correct answer, - change choice="partially-correct" to choice="correct" or choice="incorrect") - </option> - </options> - </annotationinput> - </annotationresponse> - <solution> - <p>PLACEHOLDER: Detailed explanation of solution</p> - </solution> - </problem> - -.. include:: ../../links/links.rst diff --git a/projects/panduck-sycamore/tests/rst/header.html b/projects/panduck-sycamore/tests/rst/header.html deleted file mode 100644 index 40923c9..0000000 --- a/projects/panduck-sycamore/tests/rst/header.html +++ /dev/null @@ -1 +0,0 @@ -<html><head><meta charset="UTF-8"/><meta name="viewport-8" content="'width=device-width, initial-scale=1.0'"/><link rel="stylesheet" href="https://latex.now.sh/style.css"/></head><div class="notedown"><value>Null</value><p><h1>一级标题</h1><p>源码 ::</p><p> ============ 一级标题 ============</p><p> = 的数量为标题的长度,不同于二级标题,一级标题,上下层都要包含=。</p><p><h1>二级标题</h1><p>源码 ::</p><p> 二级标题 ============</p><p> = 的数量为标题的长度。</p><p><h1>三级标题</h1><p>源码 ::</p><p> 三级标题 ----------</p><p> - 的数量为标题的长度。</p><p><h1>四级标题</h1><p>源码 ::</p><p> 四级标题 ^^^^^^^^^^^</p><p> ^ 的数量为标题的长度。</p><p><h1>五级标题</h1><p>源码 ::</p><p> 五级标题 """"""""""""</p><p> " 的数量为标题的长度。</p><p><h1>六级标题</h1><p>源码 ::</p><p> 六级标题 ***********</p><p> * 的数量为标题的长度。</p></p></p></p></p></p></p></div></html> \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/rst/header.rst b/projects/panduck-sycamore/tests/rst/header.rst deleted file mode 100644 index 9cd5670..0000000 --- a/projects/panduck-sycamore/tests/rst/header.rst +++ /dev/null @@ -1,65 +0,0 @@ -.. index:: - single: 标题 - -============ -一级标题 -============ - -源码 :: - - ============ - 一级标题 - ============ - - = 的数量为标题的长度,不同于二级标题,一级标题,上下层都要包含=。 - -二级标题 -============ - -源码 :: - - 二级标题 - ============ - - = 的数量为标题的长度。 - -三级标题 ----------- - -源码 :: - - 三级标题 - ---------- - - - 的数量为标题的长度。 - -四级标题 -^^^^^^^^^^^ - -源码 :: - - 四级标题 - ^^^^^^^^^^^ - - ^ 的数量为标题的长度。 - -五级标题 -"""""""""""" - -源码 :: - - 五级标题 - """""""""""" - - " 的数量为标题的长度。 - - -六级标题 -*********** - -源码 :: - - 六级标题 - *********** - - * 的数量为标题的长度。 \ No newline at end of file diff --git a/projects/panduck-sycamore/tests/rst/mod.rs b/projects/panduck-sycamore/tests/rst/mod.rs deleted file mode 100644 index a37941a..0000000 --- a/projects/panduck-sycamore/tests/rst/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -use super::*; - -pub fn html_standalone(source: &str, target: &str) -> Result<()> { - html_standalone_builder(panduck_core::convert::parse_rst)(source, target) -} - -#[test] -pub fn example() -> Result<()> { - html_standalone(include_str!("example.rst"), include_str!("example.html"))?; - Ok(()) -} - -#[test] -pub fn header() -> Result<()> { - html_standalone(include_str!("header.rst"), include_str!("header.html"))?; - Ok(()) -} diff --git a/projects/panduck-yew/Cargo.toml b/projects/panduck-yew/Cargo.toml deleted file mode 100644 index feb99d4..0000000 --- a/projects/panduck-yew/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "panduck-yew" -version = "0.18.0" -authors = ["Aster <192607617@qq.com>"] -description = "use panduck to generate pdfs" -repository = "https://github.com/oovm/panduck" -readme = "../../readme.md" -license = "MPL-2.0" -edition = "2018" - -[dependencies] -notedown_ast = "0.16.3" -yew = "0.19.3" - -[dev-dependencies.panduck-core] -version = "0.1.3" -path = "../panduck-core" diff --git a/projects/panduck-yew/readme.md b/projects/panduck-yew/readme.md deleted file mode 100644 index 9bd12fc..0000000 --- a/projects/panduck-yew/readme.md +++ /dev/null @@ -1 +0,0 @@ -# Counting lib \ No newline at end of file diff --git a/projects/panduck-yew/rustfmt.toml b/projects/panduck-yew/rustfmt.toml deleted file mode 100644 index 5f6b2cd..0000000 --- a/projects/panduck-yew/rustfmt.toml +++ /dev/null @@ -1,7 +0,0 @@ -version = "Two" -edition = "2018" -max_width = 128 - -imports_granularity = "Crate" -use_small_heuristics = "Max" -control_brace_style = "ClosingNextLine" \ No newline at end of file diff --git a/projects/panduck-yew/src/lib.rs b/projects/panduck-yew/src/lib.rs deleted file mode 100644 index 8b13789..0000000 --- a/projects/panduck-yew/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/projects/panduck-yew/tests/main.rs b/projects/panduck-yew/tests/main.rs deleted file mode 100644 index cf5bed2..0000000 --- a/projects/panduck-yew/tests/main.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[test] -fn ready() { - println!("it works!") -}