markdown-0.3.0/.cargo_vcs_info.json0000644000000001121372054124000127440ustar00{ "git": { "sha1": "9aba1e63556792c3a4ad5afe12b108ff3ed92beb" } } markdown-0.3.0/.gitignore010064400007660000024000000001341371206125600135450ustar0000000000000000/target /Cargo.lock # Compiled files *.o *.so *.rlib *.dll # Executables *.exe .DS_Store markdown-0.3.0/.travis.yml010064400007660000024000000012711371207001300136600ustar0000000000000000sudo: false language: rust rust: - nightly - beta - stable matrix: allow_failures: - rust: nightly before_script: - | pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH script: - | travis-cargo build && travis-cargo test && travis-cargo bench && travis-cargo --only stable doc addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev after_success: - travis-cargo --only stable doc-upload - travis-cargo coveralls --no-sudo env: global: secure: u5D44hcrolV3gPnrISWBBD4U39JvcTfeRdPKEw/OLM9duglXPnaYZEWpVwWkH9dAFACymdqRZoivIMzA1O/B950A3VnD6cZ3HOWlw3OCPJasfol2RrJYsN0PYh0gn8TPZardQYX3/pAt2UI9mmoWHchCMtbkyv2ZD46KB3DkXkg= markdown-0.3.0/Cargo.lock0000644000000044751372054124000107370ustar00# This file is automatically @generated by Cargo. # It is not intended for manual editing. [[package]] name = "aho-corasick" version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" dependencies = [ "memchr", ] [[package]] name = "difference" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffef4c144e881a906ed5bd6e1e749dc1955cd3f0c7969d3d34122a971981c5ea" dependencies = [ "getopts", ] [[package]] name = "getopts" version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" dependencies = [ "unicode-width", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "markdown" version = "0.3.0" dependencies = [ "difference", "lazy_static", "pipeline", "regex", ] [[package]] name = "memchr" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" [[package]] name = "pipeline" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d15b6607fa632996eb8a17c9041cb6071cb75ac057abd45dece578723ea8c7c0" [[package]] name = "regex" version = "1.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" dependencies = [ "aho-corasick", "memchr", "regex-syntax", "thread_local", ] [[package]] name = "regex-syntax" version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" [[package]] name = "thread_local" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ "lazy_static", ] [[package]] name = "unicode-width" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" markdown-0.3.0/Cargo.toml0000644000000021501372054124000107460ustar00# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] name = "markdown" version = "0.3.0" authors = ["Johann Hofmann "] exclude = ["test.md"] description = "Native Rust library for parsing Markdown and (outputting HTML)" readme = "README.md" keywords = ["markdown", "md", "html", "parser"] license = "MIT OR Apache-2.0" repository = "https://github.com/johannhof/markdown.rs" [[bin]] name = "markdown" doc = false [dependencies.lazy_static] version = "1.4.0" [dependencies.pipeline] version = "0.5" [dependencies.regex] version = "1" [dev-dependencies.difference] version = "0.4" [features] default = [] unstable = [] markdown-0.3.0/Cargo.toml.orig010064400007660000024000000010461372053741100144470ustar0000000000000000[package] name = "markdown" version = "0.3.0" authors = ["Johann Hofmann "] description = "Native Rust library for parsing Markdown and (outputting HTML)" repository = "https://github.com/johannhof/markdown.rs" readme = "README.md" keywords = ["markdown", "md", "html", "parser"] license = "MIT OR Apache-2.0" exclude = [ "test.md" ] [[bin]] name = "markdown" doc = false [features] default = [] unstable = [] [dependencies] lazy_static = "1.4.0" pipeline = "0.5" regex = "1" [dev-dependencies] difference = "0.4" markdown-0.3.0/LICENSE-APACHE010064400007660000024000000261361371206125600135130ustar0000000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. markdown-0.3.0/LICENSE-MIT010064400007660000024000000020561371206125600132160ustar0000000000000000Copyright (c) 2015 The markdown.rs Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. markdown-0.3.0/README.md010064400007660000024000000031711371434033000130330ustar0000000000000000markdown.rs [![](https://travis-ci.org/johannhof/markdown.rs.svg?branch=master)](https://travis-ci.org/johannhof/markdown.rs) [![](https://img.shields.io/crates/v/markdown.svg)](https://crates.io/crates/markdown) [![](https://coveralls.io/repos/johannhof/markdown.rs/badge.svg?branch=master&service=github)](https://coveralls.io/github/johannhof/markdown.rs?branch=master) =========== A simple native Rust library for parsing Markdown and (outputting HTML). Usage ---------- To include markdown in your project add the following to your Cargo.toml: ```toml [dependencies] markdown = "0.3" ``` Now you can use the crate in your code with ```rust extern crate markdown; ``` There is no full documentation right now, the only function exported by the library is `to_html`, which takes a markdown `&str` and converts it to an owned `String` containing html. ```rust let html : String = markdown::to_html("__I am markdown__"); assert_eq!(&html, "I am markdown") ``` TODO ---------- - [ ] Inline HTML - [ ] Backslash Escapes - [ ] Automatic Links - [ ] Reference-Style Links - [ ] List wrapping - [ ] HTML Entities - [ ] Obscure Emails ## License Licensed under either of * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) at your option. ### Contribution Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. markdown-0.3.0/src/html.rs010064400007660000024000000114671371433453700137000ustar0000000000000000use parser::Block; use parser::Block::{Header, Paragraph, Blockquote, Hr, CodeBlock, UnorderedList, OrderedList, Raw}; use parser::{Span, ListItem, OrderedListType}; use parser::Span::{Break, Text, Emphasis, Strong, Code, Link, Image}; // takes a number of elements and returns their collective text as a slug fn slugify(elements: &[Span]) -> String { let mut ret = String::new(); for el in elements { let next = match *el { Break => "".to_owned(), Text(ref text) | Link(ref text, _, _) | Image(ref text, _, _) | Code(ref text) => text.trim().replace(" ", "_").to_lowercase().to_owned(), Strong(ref content) | Emphasis(ref content) => slugify(content), }; if !ret.is_empty() { ret.push('_'); } ret.push_str(&next); } ret } pub fn to_html(blocks: &[Block]) -> String { let mut ret = String::new(); for block in blocks.iter() { let next = match *block { Header(ref elements, level) => format_header(elements, level), Paragraph(ref elements) => format_paragraph(elements), Blockquote(ref elements) => format_blockquote(elements), CodeBlock(ref lang, ref elements) => format_codeblock(lang, elements), UnorderedList(ref elements) => format_unordered_list(elements), OrderedList(ref elements, ref num_type) => format_ordered_list(elements,num_type), Raw(ref elements) => elements.to_owned(), Hr => format!("
"), }; ret.push_str(&next) } ret = ret.trim().to_owned(); ret.push('\n'); ret } fn format_spans(elements: &[Span]) -> String { let mut ret = String::new(); for element in elements.iter() { let next = match *element { Break => format!("
"), Text(ref text) => format!("{}", &escape(text)), Code(ref text) => format!("{}", &escape(text)), Link(ref text, ref url, None) => format!("{}", &escape(url), &escape(text)), Link(ref text, ref url, Some(ref title)) => format!("{}", &escape(url), &escape(title), &escape(text)), Image(ref text, ref url, None) => format!("{}", &escape(url), &escape(text)), Image(ref text, ref url, Some(ref title)) => format!("{}", &escape(url), &escape(title), &escape(text)), Emphasis(ref content) => format!("{}", format_spans(content)), Strong(ref content) => format!("{}", format_spans(content)), }; ret.push_str(&next) } ret } fn escape(text: &str) -> String { text.replace("&", "&") .replace("<", "<") .replace("\"", """) .replace("'", "’") .replace(">", ">") } fn format_list(elements: &[ListItem], start_tag: &str, end_tag: &str) -> String { let mut ret = String::new(); for list_item in elements { let mut content = String::new(); match *list_item { ListItem::Simple(ref els) => { content.push_str(&format_spans(els)) } ListItem::Paragraph(ref paragraphs) => { content.push_str(&format!("\n{}", to_html(paragraphs))) } } ret.push_str(&format!("\n
  • {}
  • \n", content)) } format!("<{}>{}\n\n", start_tag, ret, end_tag) } fn format_unordered_list(elements: &[ListItem]) -> String { format_list(elements, "ul", "ul") } fn format_ordered_list(elements: &[ListItem], num_type: &OrderedListType) -> String { format_list(elements, &format!("ol type=\"{}\"", num_type.0), "ol") } fn format_codeblock(lang: &Option,elements: &str) -> String { if lang.is_none() || (lang.is_some() && lang.as_ref().unwrap().is_empty()) { format!("
    {}
    \n\n", &escape(elements)) } else { format!("
    {}
    \n\n", &escape(lang.as_ref().unwrap()), &escape(elements)) } } fn format_blockquote(elements: &[Block]) -> String { format!("
    \n{}
    \n\n", to_html(elements)) } fn format_paragraph(elements: &[Span]) -> String { format!("

    {}

    \n\n", format_spans(elements)) } fn format_header(elements: &[Span], level: usize) -> String { format!("{}\n\n", level, slugify(elements), format_spans(elements), level) } markdown-0.3.0/src/lib.rs010064400007660000024000000022361371433453700134740ustar0000000000000000//! A crate for parsing Markdown in Rust #![crate_name = "markdown"] #![deny(missing_docs)] // #![deny(warnings)] #![cfg_attr(feature="clippy", feature(plugin))] #![cfg_attr(feature="clippy", plugin(clippy))] extern crate regex; #[macro_use] extern crate pipeline; #[macro_use] extern crate lazy_static; use std::fs::File; use std::path::Path; use std::io::{self, Read}; mod parser; mod markdown_generator; mod html; pub use parser::{Block, ListItem, Span}; /// Converts a Markdown string to HTML pub fn to_html(text: &str) -> String { let result = parser::parse(text); html::to_html(&result) } /// Converts a Markdown string to a tokenset of Markdown items pub fn tokenize(text: &str) -> Vec { parser::parse(text) } /// Convert tokenset of Markdown items back to String pub fn generate_markdown(x: Vec) -> String { markdown_generator::generate(x) } /// Opens a file and converts its contents to HTML pub fn file_to_html(path: &Path) -> io::Result { let mut file = File::open(path)?; let mut text = String::new(); file.read_to_string(&mut text)?; let result = parser::parse(&text); Ok(html::to_html(&result)) } markdown-0.3.0/src/main.rs010064400007660000024000000004371371206125600136440ustar0000000000000000extern crate markdown; use std::path::Path; use std::env; fn main() { let args: Vec = env::args().collect(); println!("{:?}", args); let path = Path::new(&args[1]); // let display = path.display(); println!("{}", markdown::file_to_html(&path).unwrap()); } markdown-0.3.0/src/markdown_generator/mod.rs010064400007660000024000000050301371433460700173660ustar0000000000000000use super::{Block, ListItem, Span}; trait JoinHelper where I : Iterator { fn j(self, sep:&'static str) -> String; } impl JoinHelper for I where I : Iterator { fn j(self, sep:&'static str) -> String { self.collect::>().join(sep) } } fn gen_block(b : Block) -> String { use Block::*; match b { Header(s, level) => format!("{} {}", ::std::iter::repeat("#".to_string()).take(level).j(""), generate_from_spans(s) ), Paragraph(s) => generate_from_spans(s), Blockquote(bb) => generate(bb).lines().map(|x|format!("> {}", x)).j("\n"), CodeBlock(lang, x) => { if lang.is_none() { x.lines().map(|x|format!(" {}",x)).j("\n") } else { format!("```{}\n{}```", lang.unwrap(), x) } }, // [TODO]: Ordered list generation - 2017-12-10 10:12pm OrderedList(_x,_num_type) => unimplemented!("Generate ordered list"), UnorderedList(x) => generate_from_li(x), Raw(x) => x, Hr => "\n\n".to_string(), } } fn gen_span(s : Span) -> String { use Span::*; match s { Break => " \n".to_string(), Text(x) => x, Code(x) => format!("`{}`",x), Link(a, b, None) => format!("[{}]({})", a, b), Link(a, b, Some(c)) => format!("[{}]({} \"{}\")", a, b, c), Image(a, b, None) => format!("![{}]({})", a, b), Image(a, b, Some(c)) => format!("![{}]({} \"{}\")", a, b, c), Emphasis(x) => format!("*{}*", generate_from_spans(x)), Strong(x) => format!("**{}**", generate_from_spans(x)), } } fn generate_from_li(data: Vec) -> String { use ListItem::*; data.into_iter().map(|x|format!("* {}", match x { Simple(x) => generate_from_spans(x), Paragraph(x) => format!("{}\n", generate(x) .lines() .enumerate() .map(|(i, x)| if i == 0 { x.to_string() } else { format!(" {}", x) } ).j("\n") ), })).j("\n") } fn generate_from_spans(data: Vec) -> String { data.into_iter().map(gen_span).j("") } pub fn generate(data: Vec) -> String { data.into_iter().map(gen_block).j("\n\n") } markdown-0.3.0/src/parser/block/atx_header.rs010064400007660000024000000047231371206125600174140ustar0000000000000000use regex::Regex; use parser::Block; use parser::Block::Header; use parser::span::parse_spans; pub fn parse_atx_header(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref ATX_HEADER_RE :Regex = Regex::new(r"^(?P#{1,6})\s(?P.*?)(?:\s#*)?$").unwrap(); } if ATX_HEADER_RE.is_match(lines[0]) { let caps = ATX_HEADER_RE.captures(lines[0]).unwrap(); return Some((Header(parse_spans(caps.name("text").unwrap().as_str()), caps.name("level").unwrap().as_str().len()), 1)); } None } #[cfg(test)] mod test { use super::parse_atx_header; use parser::Block::Header; use parser::Span::Text; #[test] fn finds_atx_header() { assert_eq!(parse_atx_header(&vec!["### Test", "testtest"]).unwrap(), (Header(vec![Text("Test".to_owned())], 3), 1)); assert_eq!(parse_atx_header(&vec!["# Test", "testtest"]).unwrap(), (Header(vec![Text("Test".to_owned())], 1), 1)); assert_eq!(parse_atx_header(&vec!["###### Test", "testtest"]).unwrap(), (Header(vec![Text("Test".to_owned())], 6), 1)); assert_eq!(parse_atx_header(&vec!["### Test and a pretty long sentence", "testtest"]) .unwrap(), (Header(vec![Text("Test and a pretty long sentence".to_owned())], 3), 1)); } #[test] fn ignores_closing_hashes() { assert_eq!(parse_atx_header(&vec!["### Test ###", "testtest"]).unwrap(), (Header(vec![Text("Test".to_owned())], 3), 1)); assert_eq!(parse_atx_header(&vec!["# Test #", "testtest"]).unwrap(), (Header(vec![Text("Test".to_owned())], 1), 1)); assert_eq!(parse_atx_header(&vec!["###### Test ##", "testtest"]).unwrap(), (Header(vec![Text("Test".to_owned())], 6), 1)); assert_eq!(parse_atx_header(&vec!["### Test and a pretty long sentence #########", "testtest"]) .unwrap(), (Header(vec![Text("Test and a pretty long sentence".to_owned())], 3), 1)); } #[test] fn no_false_positives() { assert_eq!(parse_atx_header(&vec!["####### Test", "testtest"]), None); assert_eq!(parse_atx_header(&vec!["Test #", "testtest"]), None); assert_eq!(parse_atx_header(&vec!["T ### est #", "testtest"]), None); } } markdown-0.3.0/src/parser/block/blockquote.rs010064400007660000024000000046151371206125600174600ustar0000000000000000use parser::block::parse_blocks; use parser::Block; use parser::Block::Blockquote; pub fn parse_blockquote(lines: &[&str]) -> Option<(Block, usize)> { // if the first char isnt a blockquote don't even bother if lines[0].is_empty() || !lines[0].starts_with(">") { return None; } // the content of the blockquote let mut content = String::new(); // counts the number of parsed lines to return let mut i = 0; // captures if the previous item was a newline // meaning the blockquote ends next if it's not // explicitly continued with a > let mut prev_newline = false; for line in lines { // stop parsing on two newlines or if the paragraph after // a newline isn't started with a > // we continue to parse if it's just another empty line if prev_newline && line.len() > 0 && !line.starts_with(">") { break; } if line.is_empty() { prev_newline = true; } else { prev_newline = false; } let mut chars = line.chars(); let begin = match chars.next() { Some('>') => match chars.next() { Some(' ') => 2, _ => 1, }, _ => 0, }; if i > 0 { content.push('\n'); } content.push_str(&line[begin..line.len()]); i += 1; } if i > 0 { return Some((Blockquote(parse_blocks(&content)), i)); } None } #[cfg(test)] mod test { use super::parse_blockquote; use parser::Block::Blockquote; #[test] fn finds_blockquote() { match parse_blockquote(&vec!["> A citation", "> is good"]) { Some((Blockquote(_), 2)) => (), _ => panic!(), } match parse_blockquote(&vec!["> A citation", "> is good,", "very good"]) { Some((Blockquote(_), 3)) => (), _ => panic!(), } } #[test] fn knows_when_to_stop() { match parse_blockquote(&vec!["> A citation", "> is good", "", "whatever"]) { Some((Blockquote(_), 3)) => (), _ => panic!(), } } #[test] fn no_false_positives() { assert_eq!(parse_blockquote(&vec!["wat > this"]), None); } #[test] fn no_early_matching() { assert_eq!(parse_blockquote(&vec!["Hello", "> A citation", "> is good", "", "whatever"]), None); } } markdown-0.3.0/src/parser/block/code_block.rs010064400007660000024000000062621371206125600173740ustar0000000000000000use parser::Block; use parser::Block::CodeBlock; use regex::Regex; pub fn parse_code_block(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref CODE_BLOCK_SPACES: Regex = Regex::new(r"^ {4}").unwrap(); static ref CODE_BLOCK_TABS: Regex = Regex::new(r"^\t").unwrap(); static ref CODE_BLOCK_BACKTICKS: Regex = Regex::new(r"```").unwrap(); } let mut content = String::new(); let mut lang: Option = None; let mut line_number = 0; let mut backtick_opened = false; let mut backtick_closed = false; for line in lines { if !backtick_opened && CODE_BLOCK_SPACES.is_match(line) { if line_number > 0 && !content.is_empty() { content.push('\n'); } // remove top-level spaces content.push_str(&line[4..line.len()]); line_number += 1; } else if !backtick_opened && CODE_BLOCK_TABS.is_match(line) { if line_number > 0 && !content.is_empty() { content.push('\n'); } if !(line_number == 0 && line.trim().is_empty()) { // remove top-level spaces content.push_str(&line[1..line.len()]); } line_number += 1; } else if CODE_BLOCK_BACKTICKS.is_match(line) { line_number += 1; if !backtick_opened && !(line_number == 0 && line.get(3..).is_some()) { lang = Some(String::from(line.get(3..).unwrap())); backtick_opened = true; } else if backtick_opened { backtick_closed = true; break; } } else if backtick_opened { content.push_str(line); content.push('\n'); line_number += 1; } else { break; } } if line_number > 0 && ((backtick_opened && backtick_closed) || !backtick_opened) { return Some(( CodeBlock(lang, content.trim_matches('\n').to_owned()), line_number, )); } None } #[cfg(test)] mod test { use super::parse_code_block; use parser::Block::CodeBlock; #[test] fn finds_code_block() { assert_eq!( parse_code_block(&vec![" Test"]).unwrap(), ((CodeBlock(None, "Test".to_owned()), 1)) ); assert_eq!( parse_code_block(&vec![" Test", " this"]).unwrap(), ((CodeBlock(None, "Test\nthis".to_owned()), 2)) ); assert_eq!( parse_code_block(&vec!["```testlang", "Test", "this", "```"]).unwrap(), ((CodeBlock(Some(String::from("testlang")), "Test\nthis".to_owned()), 4)) ); } #[test] fn knows_when_to_stop() { assert_eq!( parse_code_block(&vec![" Test", " this", "stuff", " now"]).unwrap(), ((CodeBlock(None, "Test\nthis".to_owned()), 2)) ); } #[test] fn no_false_positives() { assert_eq!(parse_code_block(&vec![" Test"]), None); } #[test] fn no_early_matching() { assert_eq!( parse_code_block(&vec!["Test", " this", "stuff", " now"]), None ); } } markdown-0.3.0/src/parser/block/hr.rs010064400007660000024000000030411371206125600157110ustar0000000000000000use regex::Regex; use parser::Block; use parser::Block::Hr; pub fn parse_hr(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref HORIZONTAL_RULE :Regex = Regex::new(r"^(===+)$|^(---+)$").unwrap(); } if HORIZONTAL_RULE.is_match(lines[0]) { return Some((Hr, 1)); } None } #[cfg(test)] mod test { use super::parse_hr; use parser::Block::Hr; #[test] fn finds_hr() { assert_eq!(parse_hr(&vec!["-------"]).unwrap(), (Hr, 1)); assert_eq!(parse_hr(&vec!["---"]).unwrap(), (Hr, 1)); assert_eq!(parse_hr(&vec!["----------------------------"]).unwrap(), (Hr, 1)); assert_eq!(parse_hr(&vec!["-------", "abc"]).unwrap(), (Hr, 1)); assert_eq!(parse_hr(&vec!["======="]).unwrap(), (Hr, 1)); assert_eq!(parse_hr(&vec!["==="]).unwrap(), (Hr, 1)); assert_eq!(parse_hr(&vec!["============================"]).unwrap(), (Hr, 1)); assert_eq!(parse_hr(&vec!["=======", "abc"]).unwrap(), (Hr, 1)); } #[test] fn no_false_positives() { assert_eq!(parse_hr(&vec!["a-------"]), None); assert_eq!(parse_hr(&vec!["--- a"]), None); assert_eq!(parse_hr(&vec!["--a-"]), None); assert_eq!(parse_hr(&vec!["-------====--------------"]), None); assert_eq!(parse_hr(&vec!["a======"]), None); assert_eq!(parse_hr(&vec!["=== a"]), None); assert_eq!(parse_hr(&vec!["==a="]), None); assert_eq!(parse_hr(&vec!["=======---================="]), None); } } markdown-0.3.0/src/parser/block/mod.rs010064400007660000024000000115031371433453700160700ustar0000000000000000use parser::Block; use parser::Block::Paragraph; use parser::Span::{Text, Break}; use parser::span::parse_spans; mod atx_header; mod setext_header; mod hr; mod code_block; mod blockquote; mod unordered_list; mod ordered_list; use self::atx_header::parse_atx_header; use self::setext_header::parse_setext_header; use self::hr::parse_hr; use self::code_block::parse_code_block; use self::blockquote::parse_blockquote; use self::unordered_list::parse_unordered_list; use self::ordered_list::parse_ordered_list; pub fn parse_blocks (md : &str) -> Vec { let mut blocks = vec![]; let mut t = vec![]; let lines : Vec<&str> = md.lines().collect(); let mut i = 0; while i < lines.len() { match parse_block(&lines[i .. lines.len()]){ // if a block is found Some((block, consumed_lines)) => { // the current paragraph has ended, // push it to our blocks if !t.is_empty(){ blocks.push(Paragraph(t)); t = Vec::new(); } blocks.push(block); i += consumed_lines; } // no known element, let's make this a paragraph None => { // empty linebreak => new paragraph if lines[i].is_empty() && !t.is_empty(){ blocks.push(Paragraph(t)); t = Vec::new(); } let spans = parse_spans(lines[i]); // add a whitespace between linebreaks // except when we have a break element or nothing match (t.last(), spans.first()) { (Some(&Break), _) => {}, (_, None) => {}, (None, _) => {}, _ => t.push(Text(" ".to_owned())) } t.extend_from_slice(&spans); i += 1; } } } if !t.is_empty(){ blocks.push(Paragraph(t)); } blocks } fn parse_block (lines: &[&str]) -> Option<(Block, usize)>{ pipe_opt!( lines => parse_hr => parse_atx_header => parse_setext_header => parse_code_block => parse_blockquote => parse_unordered_list => parse_ordered_list ) } #[cfg(test)] mod test { use super::parse_blocks; use parser::Block::{Header, Hr, CodeBlock, Paragraph, Blockquote}; use parser::Span::Text; #[test] fn finds_atx_header() { assert_eq!( parse_blocks("### Test"), vec![Header(vec![Text("Test".to_owned())], 3)] ); } #[test] fn finds_setext_header() { assert_eq!( parse_blocks("Test\n-------"), vec![Header(vec![Text("Test".to_owned())], 2)] ); assert_eq!( parse_blocks("Test\n======="), vec![Header(vec![Text("Test".to_owned())], 1)] ); } #[test] fn finds_hr() { assert_eq!( parse_blocks("-------"), vec![Hr] ); assert_eq!( parse_blocks("======="), vec![Hr] ); } #[test] fn finds_code_block() { assert_eq!( parse_blocks(" this is code\n and this as well"), vec![CodeBlock(None, "this is code\nand this as well".to_owned())] ); assert_eq!( parse_blocks("```\nthis is code\nand this as well\n```"), vec![CodeBlock(Some(String::new()), "this is code\nand this as well".to_owned())] ); } #[test] fn finds_blockquotes() { assert_eq!( parse_blocks("> One Paragraph\n>\n> ## H2 \n>\n"), vec![Blockquote(vec![Paragraph(vec![Text("One Paragraph".to_owned())]), Header(vec![Text("H2".to_owned())], 2)])] ); assert_eq!( parse_blocks("> One Paragraph\n>\n> > Another blockquote\n>\n"), vec![Blockquote(vec![Paragraph(vec![Text("One Paragraph".to_owned())]), Blockquote(vec![Paragraph(vec![Text("Another blockquote".to_owned())])])])] ); assert_eq!( parse_blocks("> > One Paragraph\n> >\n> > Another blockquote\n>\n"), vec![Blockquote(vec![Blockquote(vec![Paragraph(vec![Text("One Paragraph".to_owned())]), Paragraph(vec![Text("Another blockquote".to_owned())])])])] ); assert_eq!( parse_blocks("> One Paragraph, just > text \n>\n"), vec![Blockquote(vec![Paragraph(vec![Text("One Paragraph, just > text".to_owned())])])] ); assert_eq!( parse_blocks("> One Paragraph\n>\n> just > text \n>\n"), vec![Blockquote(vec![Paragraph(vec![Text("One Paragraph".to_owned())]),Paragraph(vec![Text("just > text".to_owned())])])] ); } } markdown-0.3.0/src/parser/block/ordered_list.rs010064400007660000024000000132071371433453700177730ustar0000000000000000use parser::Block; use parser::block::parse_blocks; use parser::Block::{OrderedList, Paragraph}; use parser::{ ListItem, OrderedListType }; use regex::Regex; pub fn parse_ordered_list(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref LIST_BEGIN :Regex = Regex::new(r"^(?P *)(?P[0-9.]+|[aAiI]+\.) (?P.*)").unwrap(); static ref NEW_PARAGRAPH :Regex = Regex::new(r"^ +").unwrap(); static ref INDENTED :Regex = Regex::new(r"^ {0,4}(?P.*)").unwrap(); } // if the beginning doesn't match a list don't even bother if !LIST_BEGIN.is_match(lines[0]) { return None; } // a vec holding the contents and indentation // of each list item let mut contents = vec![]; let mut prev_newline = false; let mut is_paragraph = false; // counts the number of parsed lines to return let mut i = 0; let mut line_iter = lines.iter(); let mut line = line_iter.next(); let mut list_num_opt = None; // loop for list items loop { if line.is_none() || !LIST_BEGIN.is_match(line.unwrap()) { break; } if prev_newline { is_paragraph = true; prev_newline = false; } let caps = LIST_BEGIN.captures(line.unwrap()).unwrap(); let mut content = caps.name("content").unwrap().as_str().to_owned(); let last_indent = caps.name("indent").unwrap().as_str().len(); //We use the first list type found let list_num = caps.name("numbering").unwrap().as_str()[0..1].to_owned(); list_num_opt = list_num_opt.or(Some(list_num)); i += 1; // parse additional lines of the listitem loop { line = line_iter.next(); if line.is_none() || (prev_newline && !NEW_PARAGRAPH.is_match(line.unwrap())) { break; } if LIST_BEGIN.is_match(line.unwrap()) { let caps = LIST_BEGIN.captures(line.unwrap()).unwrap(); let indent = caps.name("indent").unwrap().as_str().len(); if indent < 2 || indent <= last_indent { break; } } // newline means we start a new paragraph if line.unwrap().is_empty() { prev_newline = true; } else { prev_newline = false; } content.push('\n'); let caps = INDENTED.captures(line.unwrap()).unwrap(); content.push_str(&caps.name("content").unwrap().as_str()); i += 1; } contents.push(parse_blocks(&content)); } let mut list_contents = vec![]; for c in contents { if is_paragraph || c.len() > 1 { list_contents.push(ListItem::Paragraph(c)); } else if let Paragraph(content) = c[0].clone() { list_contents.push(ListItem::Simple(content)); } } if i > 0 { let list_num = list_num_opt.unwrap_or("1".to_string()); return Some((OrderedList(list_contents, OrderedListType( list_num)), i)); } None } #[allow(non_snake_case)] #[cfg(test)] mod test { use super::parse_ordered_list; use parser::Block::OrderedList; use parser::OrderedListType; use parser::ListItem::Paragraph; fn a_type() -> OrderedListType { OrderedListType("a".to_string()) } fn A_type() -> OrderedListType { OrderedListType("A".to_string()) } fn i_type() -> OrderedListType { OrderedListType("i".to_string()) } fn I_type() -> OrderedListType { OrderedListType("I".to_string()) } fn n_type() -> OrderedListType { OrderedListType("1".to_string()) } #[test] fn finds_list() { match parse_ordered_list(&vec!["1. A list", "2. is good"]) { Some( (OrderedList(_, ref lt ), 2) ) if lt == &n_type() => (), x => panic!("Found {:?}", x), } match parse_ordered_list(&vec!["a. A list", "b. is good", "laksjdnflakdsjnf"]) { Some( (OrderedList(_, ref lt ), 3) ) if lt == &a_type() => (), x => panic!("Found {:?}", x), } match parse_ordered_list(&vec!["A. A list", "B. is good", "laksjdnflakdsjnf"]) { Some( (OrderedList(_, ref lt ), 3) ) if lt == &A_type() => (), x => panic!("Found {:?}", x), } } #[test] fn knows_when_to_stop() { match parse_ordered_list(&vec!["i. A list", "ii. is good", "", "laksjdnflakdsjnf"]) { Some( (OrderedList(_, ref lt ), 3) ) if lt == &i_type() => (), x => panic!("Found {:?}", x), } match parse_ordered_list(&vec!["I. A list", "", "laksjdnflakdsjnf"]) { Some( (OrderedList(_, ref lt), 2) ) if lt == &I_type() => (), x => panic!("Found {:?}", x), } } #[test] fn multi_level_list() { match parse_ordered_list(&vec!["1. A list", " 1.1. One point one", " 1.2. One point two"]) { Some( (OrderedList(ref items, ref lt), 3) ) if lt == &n_type() => match &items[0] { &Paragraph(ref items) => match &items[1] { &OrderedList(_, ref lt1) if lt1 == &n_type() => (), x => panic!("Found {:?}", x), } x => panic!("Found {:?}", x), }, x => panic!("Found {:?}", x), } } #[test] fn no_false_positives() { assert_eq!(parse_ordered_list(&vec!["test 1. test"]), None); } #[test] fn no_early_matching() { assert_eq!(parse_ordered_list(&vec!["test", "1. not", "2. a list"]), None); } } markdown-0.3.0/src/parser/block/setext_header.rs010064400007660000024000000026061371206125600201320ustar0000000000000000use regex::Regex; use parser::Block; use parser::Block::Header; use parser::span::parse_spans; pub fn parse_setext_header(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref HORIZONTAL_RULE_1 :Regex = Regex::new(r"^===+$").unwrap(); static ref HORIZONTAL_RULE_2 :Regex = Regex::new(r"^---+$").unwrap(); } if lines.len() > 1 { if HORIZONTAL_RULE_1.is_match(lines[1]) { return Some((Header(parse_spans(lines[0]), 1), 2)); } else if HORIZONTAL_RULE_2.is_match(lines[1]) { return Some((Header(parse_spans(lines[0]), 2), 2)); } } None } #[cfg(test)] mod test { use super::parse_setext_header; use parser::Block::Header; use parser::Span::Text; #[test] fn finds_atx_header() { assert_eq!(parse_setext_header(&vec!["Test", "=========="]).unwrap(), (Header(vec![Text("Test".to_owned())], 1), 2)); assert_eq!(parse_setext_header(&vec!["Test", "----------"]).unwrap(), (Header(vec![Text("Test".to_owned())], 2), 2)); assert_eq!(parse_setext_header(&vec!["This is a test", "==="]).unwrap(), (Header(vec![Text("This is a test".to_owned())], 1), 2)); assert_eq!(parse_setext_header(&vec!["This is a test", "---"]).unwrap(), (Header(vec![Text("This is a test".to_owned())], 2), 2)); } } markdown-0.3.0/src/parser/block/unordered_list.rs010064400007660000024000000076421371206125600203350ustar0000000000000000use parser::Block; use parser::block::parse_blocks; use parser::Block::{UnorderedList, Paragraph}; use parser::ListItem; use regex::Regex; pub fn parse_unordered_list(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref LIST_BEGIN :Regex = Regex::new(r"^(?P *)(-|\+|\*) (?P.*)").unwrap(); static ref NEW_PARAGRAPH :Regex = Regex::new(r"^ +").unwrap(); static ref INDENTED :Regex = Regex::new(r"^ {0,4}(?P.*)").unwrap(); } // if the beginning doesn't match a list don't even bother if !LIST_BEGIN.is_match(lines[0]) { return None; } // a vec holding the contents and indentation // of each list item let mut contents = vec![]; let mut prev_newline = false; let mut is_paragraph = false; // counts the number of parsed lines to return let mut i = 0; let mut line_iter = lines.iter(); let mut line = line_iter.next(); // loop for list items loop { if line.is_none() || !LIST_BEGIN.is_match(line.unwrap()) { break; } if prev_newline { is_paragraph = true; prev_newline = false; } let caps = LIST_BEGIN.captures(line.unwrap()).unwrap(); let mut content = caps.name("content").unwrap().as_str().to_owned(); let last_indent = caps.name("indent").unwrap().as_str().len(); i += 1; // parse additional lines of the listitem loop { line = line_iter.next(); if line.is_none() || (prev_newline && !NEW_PARAGRAPH.is_match(line.unwrap())) { break; } if LIST_BEGIN.is_match(line.unwrap()) { let caps = LIST_BEGIN.captures(line.unwrap()).unwrap(); let indent = caps.name("indent").unwrap().as_str().len(); if indent < 2 || indent <= last_indent { break; } } // newline means we start a new paragraph if line.unwrap().is_empty() { prev_newline = true; } else { prev_newline = false; } content.push('\n'); let caps = INDENTED.captures(line.unwrap()).unwrap(); content.push_str(&caps.name("content").unwrap().as_str()); i += 1; } contents.push(parse_blocks(&content)); } let mut list_contents = vec![]; for c in contents { if is_paragraph || c.len() > 1 { list_contents.push(ListItem::Paragraph(c)); } else if let Paragraph(content) = c[0].clone() { list_contents.push(ListItem::Simple(content)); } } if i > 0 { return Some((UnorderedList(list_contents), i)); } None } #[cfg(test)] mod test { use super::parse_unordered_list; use parser::Block::UnorderedList; #[test] fn finds_list() { match parse_unordered_list(&vec!["* A list", "* is good"]) { Some((UnorderedList(_), 2)) => (), x => panic!("Found {:?}", x), } match parse_unordered_list(&vec!["* A list", "* is good", "laksjdnflakdsjnf"]) { Some((UnorderedList(_), 3)) => (), x => panic!("Found {:?}", x), } } #[test] fn knows_when_to_stop() { match parse_unordered_list(&vec!["* A list", "* is good", "", "laksjdnflakdsjnf"]) { Some((UnorderedList(_), 3)) => (), x => panic!("Found {:?}", x), } match parse_unordered_list(&vec!["* A list", "", "laksjdnflakdsjnf"]) { Some((UnorderedList(_), 2)) => (), x => panic!("Found {:?}", x), } } #[test] fn no_false_positives() { assert_eq!(parse_unordered_list(&vec!["test * test"]), None); } #[test] fn no_early_matching() { assert_eq!(parse_unordered_list(&vec!["test", "* whot", "* a list"]), None); } } markdown-0.3.0/src/parser/mod.rs010064400007660000024000000016521371433453700150020ustar0000000000000000mod span; mod block; #[allow(missing_docs)] #[derive(Debug, PartialEq, Eq, Clone)] pub struct OrderedListType(pub String); #[allow(missing_docs)] #[derive(Debug, PartialEq, Clone)] pub enum Block { Header(Vec, usize), Paragraph(Vec), Blockquote(Vec), CodeBlock(Option, String), //String is the type of list: A,a,i,I or 1 OrderedList(Vec,OrderedListType), UnorderedList(Vec), Raw(String), Hr } #[allow(missing_docs)] #[derive(Debug, PartialEq, Clone)] pub enum ListItem { Simple(Vec), Paragraph(Vec) } #[allow(missing_docs)] #[derive(Debug, PartialEq, Clone)] pub enum Span { Break, Text(String), Code(String), Link(String, String, Option), Image(String, String, Option), Emphasis(Vec), Strong(Vec) } pub fn parse (md : &str) -> Vec { block::parse_blocks(md) } markdown-0.3.0/src/parser/span/br.rs010064400007660000024000000012341371206125600155540ustar0000000000000000use regex::Regex; use parser::Span; use parser::Span::Break; pub fn parse_break(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref BR: Regex = Regex::new(r"^ {2}$").unwrap(); } if BR.is_match(text) { return Some((Break, 2)); } None } #[cfg(test)] mod test { use parser::Span::Break; use super::parse_break; #[test] fn finds_breaks() { assert_eq!(parse_break(" "), Some((Break, 2))); } #[test] fn no_false_positives() { assert_eq!(parse_break("this is a test "), None); assert_eq!(parse_break(" "), None); assert_eq!(parse_break(" a"), None); } } markdown-0.3.0/src/parser/span/code.rs010064400007660000024000000034761371206125600160750ustar0000000000000000use regex::Regex; use parser::Span; use parser::Span::Code; pub fn parse_code(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref CODE_SINGLE :Regex = Regex::new(r"^`(?P.+?)`").unwrap(); static ref CODE_DOUBLE :Regex = Regex::new(r"^``(?P.+?)``").unwrap(); } if CODE_DOUBLE.is_match(text) { let caps = CODE_DOUBLE.captures(text).unwrap(); let t = caps.name("text").unwrap().as_str(); return Some((Code(t.to_owned()), t.len() + 4)); } else if CODE_SINGLE.is_match(text) { let caps = CODE_SINGLE.captures(text).unwrap(); let t = caps.name("text").unwrap().as_str(); return Some((Code(t.to_owned()), t.len() + 2)); } None } #[test] fn finds_code() { assert_eq!(parse_code("`testing things` test"), Some((Code("testing things".to_owned()), 16))); assert_eq!(parse_code("``testing things`` test"), Some((Code("testing things".to_owned()), 18))); assert_eq!(parse_code("``testing things`` things`` test"), Some((Code("testing things".to_owned()), 18))); assert_eq!(parse_code("`w` testing things test"), Some((Code("w".to_owned()), 3))); assert_eq!(parse_code("`w`` testing things test"), Some((Code("w".to_owned()), 3))); assert_eq!(parse_code("``w`` testing things test"), Some((Code("w".to_owned()), 5))); assert_eq!(parse_code("``w``` testing things test"), Some((Code("w".to_owned()), 5))); } #[test] fn no_false_positives() { assert_eq!(parse_code("`` testing things test"), None); assert_eq!(parse_code("` test"), None); } #[test] fn no_early_matching() { assert_eq!(parse_code("were ``testing things`` test"), None); assert_eq!(parse_code("were `testing things` test"), None); } markdown-0.3.0/src/parser/span/emphasis.rs010064400007660000024000000041371371206125600167670ustar0000000000000000use regex::Regex; use parser::span::parse_spans; use parser::Span; use parser::Span::Emphasis; pub fn parse_emphasis(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref EMPHASIS_UNDERSCORE :Regex = Regex::new(r"^_(?P.+?)_").unwrap(); static ref EMPHASIS_STAR :Regex = Regex::new(r"^\*(?P.+?)\*").unwrap(); } if EMPHASIS_UNDERSCORE.is_match(text) { let caps = EMPHASIS_UNDERSCORE.captures(text).unwrap(); let t = caps.name("text").unwrap().as_str(); return Some((Emphasis(parse_spans(t)), t.len() + 2)); } else if EMPHASIS_STAR.is_match(text) { let caps = EMPHASIS_STAR.captures(text).unwrap(); let t = caps.name("text").unwrap().as_str(); return Some((Emphasis(parse_spans(t)), t.len() + 2)); } None } #[cfg(test)] mod test { use parser::Span::{Text, Emphasis}; use super::parse_emphasis; #[test] fn finds_emphasis() { assert_eq!(parse_emphasis("_testing things_ test"), Some((Emphasis(vec![Text("testing things".to_owned())]), 16))); assert_eq!(parse_emphasis("*testing things* test"), Some((Emphasis(vec![Text("testing things".to_owned())]), 16))); assert_eq!(parse_emphasis("_testing things_ things_ test"), Some((Emphasis(vec![Text("testing things".to_owned())]), 16))); assert_eq!(parse_emphasis("_w_ things_ test"), Some((Emphasis(vec![Text("w".to_owned())]), 3))); assert_eq!(parse_emphasis("*w* things* test"), Some((Emphasis(vec![Text("w".to_owned())]), 3))); assert_eq!(parse_emphasis("_w__ testing things test"), Some((Emphasis(vec![Text("w".to_owned())]), 3))); } #[test] fn no_false_positives() { assert_eq!(parse_emphasis("__ testing things test"), None); assert_eq!(parse_emphasis("_ test"), None); } #[test] fn no_early_matching() { assert_eq!(parse_emphasis("were _testing things_ test"), None); assert_eq!(parse_emphasis("were *testing things* test"), None); } } markdown-0.3.0/src/parser/span/image.rs010064400007660000024000000042611371433133300162340ustar0000000000000000use regex::Regex; use parser::Span; use parser::Span::Image; pub fn parse_image(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref IMAGE :Regex = Regex::new("^!\\[(?P.*?)\\]\\((?P.*?)(?:\\s\"(?P.*?)\")?\\)").unwrap(); } if IMAGE.is_match(text) { let caps = IMAGE.captures(text).unwrap(); let text = if let Some(mat) = caps.name("text") { mat.as_str().to_owned() } else { "".to_owned() }; let url = if let Some(mat) = caps.name("url") { mat.as_str().to_owned() } else { "".to_owned() }; let title = if let Some(mat) = caps.name("title") { Some(mat.as_str().to_owned()) } else { None }; // TODO correctly get whitespace length between url and title let len = text.len() + url.len() + 5 + title.clone().map_or(0, |t| t.len() + 3); return Some((Image(text, url, title), len)); } None } #[test] fn finds_image() { assert_eq!(parse_image("![an example](example.com) test"), Some((Image("an example".to_owned(), "example.com".to_owned(), None), 26))); assert_eq!(parse_image("![](example.com) test"), Some((Image("".to_owned(), "example.com".to_owned(), None), 16))); assert_eq!(parse_image("![an example]() test"), Some((Image("an example".to_owned(), "".to_owned(), None), 15))); assert_eq!(parse_image("![]() test"), Some((Image("".to_owned(), "".to_owned(), None), 5))); assert_eq!(parse_image("![an example](example.com \"Title\") test"), Some((Image("an example".to_owned(), "example.com".to_owned(), Some("Title".to_owned())), 34))); assert_eq!(parse_image("![an example](example.com) test [a link](example.com)"), Some((Image("an example".to_owned(), "example.com".to_owned(), None), 26))); } #[test] fn no_false_positives() { assert_eq!(parse_image("![()] testing things test"), None); assert_eq!(parse_image("!()[] testing things test"), None); } #[test] fn no_early_matching() { assert_eq!(parse_image("were ![an example](example.com) test"), None); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/src/parser/span/link.rs��������������������������������������������������������������0100644�0000766�0000024�00000004320�13712061256�0016105�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use regex::Regex; use parser::Span; use parser::Span::Link; pub fn parse_link(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref LINK :Regex = Regex::new("^\\[(?P<text>.*?)\\]\\((?P<url>.*?)(?:\\s\"(?P<title>.*?)\")?\\)").unwrap(); } if LINK.is_match(text) { let caps = LINK.captures(text).unwrap(); let text = if let Some(mat) = caps.name("text") { mat.as_str().to_owned() } else { "".to_owned() }; let url = if let Some(mat) = caps.name("url") { mat.as_str().to_owned() } else { "".to_owned() }; let title = if let Some(mat) = caps.name("title") { Some(mat.as_str().to_owned()) } else { None }; // let title = caps.name("title").map(|t| t.to_owned()); // TODO correctly get whitespace length between url and title let len = text.len() + url.len() + 4 + title.clone().map_or(0, |t| t.len() + 3); return Some((Link(text, url, title), len)); } None } #[test] fn finds_link() { assert_eq!(parse_link("[an example](example.com) test"), Some((Link("an example".to_owned(), "example.com".to_owned(), None), 25))); assert_eq!(parse_link("[](example.com) test"), Some((Link("".to_owned(), "example.com".to_owned(), None), 15))); assert_eq!(parse_link("[an example]() test"), Some((Link("an example".to_owned(), "".to_owned(), None), 14))); assert_eq!(parse_link("[]() test"), Some((Link("".to_owned(), "".to_owned(), None), 4))); assert_eq!(parse_link("[an example](example.com \"Title\") test"), Some((Link("an example".to_owned(), "example.com".to_owned(), Some("Title".to_owned())), 33))); assert_eq!(parse_link("[an example](example.com) test [a link](example.com)"), Some((Link("an example".to_owned(), "example.com".to_owned(), None), 25))); } #[test] fn no_false_positives() { assert_eq!(parse_link("[()] testing things test"), None); assert_eq!(parse_link("()[] testing things test"), None); } #[test] fn no_early_matching() { assert_eq!(parse_link("were [an example](example.com) test"), None); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/src/parser/span/mod.rs���������������������������������������������������������������0100644�0000766�0000024�00000011210�13714334537�0015732�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use parser::Span; use parser::Span::Text; mod br; mod code; mod emphasis; mod strong; mod link; mod image; use self::br::parse_break; use self::code::parse_code; use self::emphasis::parse_emphasis; use self::strong::parse_strong; use self::link::parse_link; use self::image::parse_image; pub fn parse_spans(text: &str) -> Vec<Span>{ let mut tokens = vec![]; let mut t = String::new(); let mut i = 0; while i < text.len() { match parse_span(&text[i .. text.len()]){ Some((span, consumed_chars)) => { if !t.is_empty(){ // if this text is on the very left // trim the left whitespace if tokens.is_empty() { t = t.trim_start().to_owned() } tokens.push(Text(t)); } tokens.push(span); t = String::new(); i += consumed_chars; } None => { let mut e = i + 1; while !text.is_char_boundary(e) { e += 1; } t.push_str(&text[i..e]); i += e - i; } } } if !t.is_empty(){ // if this text is on the very left // trim the left whitespace if tokens.is_empty() { t = t.trim_start().to_owned(); } // we're at the very end of this line, // trim trailing whitespace t = t.trim_end().to_owned(); tokens.push(Text(t)); } tokens } fn parse_span(text: &str) -> Option<(Span, usize)>{ pipe_opt!( text => parse_code => parse_strong => parse_emphasis => parse_break => parse_image => parse_link ) } #[cfg(test)] mod test { use parser::Span::{Text, Break, Code, Emphasis, Strong, Link, Image}; use parser::span::parse_spans; use std::str; #[test] fn converts_into_text() { assert_eq!(parse_spans("this is a test"), vec![Text("this is a test".to_owned())]); } #[test] fn finds_breaks() { assert_eq!(parse_spans("this is a test "), vec![Text("this is a test".to_owned()), Break]); } #[test] fn finds_code() { assert_eq!(parse_spans("this `is a` test"), vec![Text("this ".to_owned()), Code("is a".to_owned()), Text(" test".to_owned())]); assert_eq!(parse_spans("this ``is a`` test"), vec![Text("this ".to_owned()), Code("is a".to_owned()), Text(" test".to_owned())]); } #[test] fn finds_emphasis() { assert_eq!(parse_spans("this _is a_ test"), vec![Text("this ".to_owned()), Emphasis(vec![Text("is a".to_owned())]), Text(" test".to_owned())]); assert_eq!(parse_spans("this *is a* test"), vec![Text("this ".to_owned()), Emphasis(vec![Text("is a".to_owned())]), Text(" test".to_owned())]); } #[test] fn finds_strong() { assert_eq!(parse_spans("this __is a__ test"), vec![Text("this ".to_owned()), Strong(vec![Text("is a".to_owned())]), Text(" test".to_owned())]); assert_eq!(parse_spans("this **is a** test"), vec![Text("this ".to_owned()), Strong(vec![Text("is a".to_owned())]), Text(" test".to_owned())]); } #[test] fn finds_link() { assert_eq!( parse_spans("this is [an example](example.com) test"), vec![Text("this is ".to_owned()), Link("an example".to_owned(), "example.com".to_owned(), None), Text(" test".to_owned())] ); } #[test] fn finds_image() { assert_eq!( parse_spans("this is ![an example](example.com) test"), vec![Text("this is ".to_owned()), Image("an example".to_owned(), "example.com".to_owned(), None), Text(" test".to_owned())] ); } #[test] fn finds_everything() { assert_eq!( parse_spans("some text ![an image](image.com) _emphasis_ __strong__ `teh codez` [a link](example.com) "), vec![ Text("some text ".to_owned()), Image("an image".to_owned(), "image.com".to_owned(), None), Text(" ".to_owned()), Emphasis(vec![Text("emphasis".to_owned())]), Text(" ".to_owned()), Strong(vec![Text("strong".to_owned())]), Text(" ".to_owned()), Code("teh codez".to_owned()), Text(" ".to_owned()), Link("a link".to_owned(), "example.com".to_owned(), None), Break ] ); } #[test] fn properly_consumes_multibyte_utf8() { let test_phrase = str::from_utf8(b"This shouldn\xE2\x80\x99t panic").unwrap(); let _ = parse_spans(&test_phrase); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/src/parser/span/strong.rs������������������������������������������������������������0100644�0000766�0000024�00000004372�13712061256�0016473�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use regex::Regex; use parser::span::parse_spans; use parser::Span; use parser::Span::Strong; pub fn parse_strong(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref STRONG_UNDERSCORE :Regex = Regex::new(r"^__(?P<text>.+?)__").unwrap(); static ref STRONG_STAR :Regex = Regex::new(r"^\*\*(?P<text>.+?)\*\*").unwrap(); } if STRONG_UNDERSCORE.is_match(text) { let caps = STRONG_UNDERSCORE.captures(text).unwrap(); let t = caps.name("text").unwrap().as_str(); return Some((Strong(parse_spans(t)), t.len() + 4)); } else if STRONG_STAR.is_match(text) { let caps = STRONG_STAR.captures(text).unwrap(); let t = caps.name("text").unwrap().as_str(); return Some((Strong(parse_spans(t)), t.len() + 4)); } None } #[cfg(test)] mod test { use parser::Span::{Text, Strong}; use super::parse_strong; #[test] fn finds_strong() { assert_eq!(parse_strong("__testing things__ test"), Some((Strong(vec![Text("testing things".to_owned())]), 18))); assert_eq!(parse_strong("**testing things** test"), Some((Strong(vec![Text("testing things".to_owned())]), 18))); assert_eq!(parse_strong("__testing things__ things__ test"), Some((Strong(vec![Text("testing things".to_owned())]), 18))); assert_eq!(parse_strong("__w__ things_ test"), Some((Strong(vec![Text("w".to_owned())]), 5))); assert_eq!(parse_strong("**w** things** test"), Some((Strong(vec![Text("w".to_owned())]), 5))); assert_eq!(parse_strong("__w___ testing things test"), Some((Strong(vec![Text("w".to_owned())]), 5))); } #[test] fn no_false_positives() { assert_eq!(parse_strong("__ testing things test"), None); assert_eq!(parse_strong("__testing things** test"), None); assert_eq!(parse_strong("____ testing things test"), None); assert_eq!(parse_strong("** test"), None); assert_eq!(parse_strong("**** test"), None); } #[test] fn no_early_matching() { assert_eq!(parse_strong("were __testing things__ test"), None); assert_eq!(parse_strong("were **testing things** test"), None); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/README����������������������������������������������������������������0100755�0000766�0000024�00000003522�13712061256�0015457�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������All of these tests (so far) were copied from: github.com/bobtfish/text-markdown/t @ 29ffc3 which is licensed as follows: Copyright (c) 2004, John Gruber <http://daringfireball.net/> All rights reserved. MultiMarkdown changes Copyright (c) 2005-2006 Fletcher T. Penney <http://fletcher.freeshell.org/> All rights reserved. Text::MultiMarkdown changes Copyright (c) 2006-2009 Darren Kulp <http://kulp.ch> and Tomas Doran <http://www.bobtfish.net> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name "Markdown" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/abbreviations.html�������������������������������0100755�0000766�0000024�00000000323�13712061256�0024420�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>The <abbr title='Hyper Text Markup Language'>HTML</abbr> specification is maintained by the <abbr title='World Wide Web Consortium'>W3C</abbr>.</p> <p>Operation <abbr>Tigra Genesis</abbr> is going well.</p> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/abbreviations.text�������������������������������0100755�0000766�0000024�00000000267�13712061256�0024447�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ The HTML specification is maintained by the W3C. *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium Operation Tigra Genesis is going well. *[Tigra Genesis]: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/alt.html�����������������������������������������0100755�0000766�0000024�00000000050�13712061256�0022345�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p><img src='/foo.jpg' alt='bar' /></p> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/alt.text�����������������������������������������0100755�0000766�0000024�00000000024�13712061256�0022366�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ ![bar](/foo.jpg) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/blank.html���������������������������������������0100755�0000766�0000024�00000000037�13712061256�0022661�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Linea 1</p> <p>Linea 2</p> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/blank.text���������������������������������������0100755�0000766�0000024�00000000022�13712061256�0022673�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ Linea 1 Linea 2 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/blanks_in_code.html������������������������������0100755�0000766�0000024�00000000333�13712061256�0024523�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This block is composed of three lines:</p> <pre><code>one three</code></pre> <p>This block is composed of 5</p> <pre><code>one four</code></pre> <p>This block is composed of 2</p> <pre><code>two</code></pre> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/blanks_in_code.text������������������������������0100755�0000766�0000024�00000000220�13712061256�0024536�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This block is composed of three lines: one three This block is composed of 5 one four This block is composed of 2 two ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/bug_def.html�������������������������������������0100755�0000766�0000024�00000000032�13712061256�0023160�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p><span>test</span>:</p> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/bug_def.text�������������������������������������0100755�0000766�0000024�00000000013�13712061256�0023177�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[test][]: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/bug_table.html�����������������������������������0100755�0000766�0000024�00000000423�13712061256�0023515�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p class='class1' style='color:red'>hello</p> <table class='class1' summary='Table summary' style='color:red'><thead><tr><th>h</th><th>h</th></tr></thead><tbody><tr><th scope='row' style='text-align: left;'> c1</th><td style='text-align: left;'>c2</td> </tr></tbody></table> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/bug_table.text�����������������������������������0100755�0000766�0000024�00000000265�13712061256�0023541�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ hello {: summary="Table summary" .class1 style="color:red"} h | h ----------|-- {:t} c1 | c2 {: summary="Table summary" .class1 style="color:red"} {:t: scope="row"} �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/code.html����������������������������������������0100755�0000766�0000024�00000000173�13712061256�0022505�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Here is an example of AppleScript:</p> <pre><code>tell application "Foo" beep end tell tab</code></pre> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/code.text����������������������������������������0100755�0000766�0000024�00000000143�13712061256�0022522�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Here is an example of AppleScript: tell application "Foo" beep end tell tab �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/code2.html���������������������������������������0100755�0000766�0000024�00000000105�13712061256�0022562�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<blockquote> <p>Code</p> <pre><code>Ciao</code></pre> </blockquote> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/code2.text���������������������������������������0100755�0000766�0000024�00000000024�13712061256�0022602�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������> Code > > Ciao ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/code3.html���������������������������������������0100755�0000766�0000024�00000000350�13712061256�0022565�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This is code (4 spaces):</p> <pre><code>Code</code></pre> <p>This is not code</p> <pre><code>Code</code></pre> <p>This is code (1 tab):</p> <pre><code>Code</code></pre> <p>This is not code</p> <pre><code>Code</code></pre> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/code3.text���������������������������������������0100755�0000766�0000024�00000000174�13712061256�0022611�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ This is code (4 spaces): Code This is not code Code This is code (1 tab): Code This is not code Code ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/data_loss.html�����������������������������������0100755�0000766�0000024�00000000043�13712061256�0023540�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ol> <li>abcd efgh ijkl</li> </ol> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/data_loss.text�����������������������������������0100755�0000766�0000024�00000000023�13712061256�0023556�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������1. abcd efgh ijkl �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/easy.html����������������������������������������0100755�0000766�0000024�00000000065�13712061256�0022534�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p><em>Hello!</em> how are <strong>you</strong>?</p> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/easy.text����������������������������������������0100755�0000766�0000024�00000000032�13712061256�0022546�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*Hello!* how are **you**? ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/email.html���������������������������������������0100755�0000766�0000024�00000000257�13712061256�0022665�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This is an email address: <a href='mailto:andrea@invalid.it'>andrea@invalid.it</a></p> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/email.text���������������������������������������0100755�0000766�0000024�00000000062�13712061256�0022677�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ This is an email address: <andrea@invalid.it> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/entities.html������������������������������������0100755�0000766�0000024�00000001640�13712061256�0023417�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Maruku translates HTML entities to the equivalent in LaTeX:</p> <table><thead><tr><th>Entity</th><th>Result</th></tr></thead><tbody><tr><td style='text-align: left;'><code>&copy;</code></td><td style='text-align: left;'>©</td> </tr><tr><td style='text-align: left;'><code>&pound;</code></td><td style='text-align: left;'>£</td> </tr><tr><td style='text-align: left;'><code>a&nbsp;b</code></td><td style='text-align: left;'>a b</td> </tr><tr><td style='text-align: left;'><code>&lambda;</code></td><td style='text-align: left;'>λ</td> </tr><tr><td style='text-align: left;'><code>&mdash;</code></td><td style='text-align: left;'>—</td> </tr></tbody></table> <p>Entity-substitution does not happen in code blocks or inline code.</p> <p>The following should not be translated:</p> <pre><code>&copy;</code></pre> <p>It should read just like this: <code>&copy;</code>.</p> ������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/entities.text������������������������������������0100755�0000766�0000024�00000000601�13712061256�0023433�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Maruku translates HTML entities to the equivalent in LaTeX: Entity | Result ------------|---------- `©` | © `£` | £ `a b` | a b `λ` | λ `—` | — Entity-substitution does not happen in code blocks or inline code. The following should not be translated: © It should read just like this: `©`. �������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/escaping.html������������������������������������0100755�0000766�0000024�00000000532�13712061256�0023363�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Hello: ! ! ` { } [ ] ( ) # . ! * * *</p> <p>Ora, <em>emphasis</em>, <strong>bold</strong>, * <- due asterischi-> * , un underscore-> _ , <em>emphasis</em>, incre<em>dible</em>e!</p> <p>This is <code>Code with a special: -> ` <-</code>(after)</p> <p><code>Start </code> of paragraph</p> <p>End of <code>paragraph </code></p> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/escaping.text������������������������������������0100755�0000766�0000024�00000000367�13712061256�0023411�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ Hello: ! \! \` \{ \} \[ \] \( \) \# \. \! * \* * Ora, *emphasis*, **bold**, * <- due asterischi-> * , un underscore-> _ , _emphasis_, incre*dible*e! This is ``Code with a special: -> ` <- ``(after) `Start ` of paragraph End of `paragraph ` �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/extra_dl.html������������������������������������0100755�0000766�0000024�00000000270�13712061256�0023373�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<dl> <dt>Apple</dt> <dd>Pomaceous fruit of plants of the genus Malus in the family Rosaceae.</dd> <dt>Orange</dt> <dd>The fruit of an evergreen tree of the genus Citrus.</dd> </dl> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/extra_dl.text������������������������������������0100755�0000766�0000024�00000000246�13712061256�0023416�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������CSS: style.css Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. Orange : The fruit of an evergreen tree of the genus Citrus. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/extra_header_id.html�����������������������������0100755�0000766�0000024�00000000505�13712061256�0024701�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<h1 id='header1'>Header 1</h1> <h2 id='header2'>Header 2</h2> <h3 id='header3'>Header 3</h3> <p>Then you can create links to different parts of the same document like this:</p> <p><a href='#header1'>Link back to header 1</a>, <a href='#header2'>Link back to header 2</a>, <a href='#header3'>Link back to header 3</a></p> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/extra_header_id.text�����������������������������0100755�0000766�0000024�00000000453�13712061256�0024723�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Header 1 {#header1} ======== Header 2 {#header2} -------- ### Header 3 ### {#header3} Then you can create links to different parts of the same document like this: [Link back to header 1](#header1), [Link back to header 2](#header2), [Link back to header 3](#header3) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/extra_table1.html��������������������������������0100755�0000766�0000024�00000000462�13712061256�0024147�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<table><thead><tr><th>First Header</th><th>Second Header</th></tr></thead><tbody><tr><td style='text-align: left;'>Content Cell</td><td style='text-align: left;'>Content Cell</td> </tr><tr><td style='text-align: left;'>Content Cell</td><td style='text-align: left;'>Content Cell</td> </tr></tbody></table> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/extra_table1.text��������������������������������0100755�0000766�0000024�00000000207�13712061256�0024164�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������CSS: style.css First Header | Second Header ------------- | ------------- Content Cell | Content Cell Content Cell | Content Cell �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/footnotes.html�����������������������������������0100755�0000766�0000024�00000001414�13712061256�0023612�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>That’s some text with a footnote <sup id='fnref:1'><a href='#fn:1' rel='footnote'>1</a></sup> and another <sup id='fnref:2'><a href='#fn:2' rel='footnote'>2</a></sup> and another <sup id='fnref:3'><a href='#fn:3' rel='footnote'>3</a></sup>.</p> <p>This is not a footnote.</p> <div class='footnotes'><hr /><ol><li id='fn:1'> <p>And that’s the footnote. This is second sentence (same paragraph).</p> <a href='#fnref:1' rev='footnote'>↩</a></li><li id='fn:2'> <p>This is the very long one.</p> <p>That’s the second paragraph.</p> <a href='#fnref:2' rev='footnote'>↩</a></li><li id='fn:3'> <p>And that’s the footnote.</p> <p>That’s the second paragraph of the footnote.</p> <a href='#fnref:3' rev='footnote'>↩</a></li></ol></div> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/footnotes.text�����������������������������������0100755�0000766�0000024�00000000510�13712061256�0023626�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������That's some text with a footnote [^b] and another [^c] and another [^a]. [^a]: And that's the footnote. That's the second paragraph of the footnote. [^b]: And that's the footnote. This is second sentence (same paragraph). [^c]: This is the very long one. That's the second paragraph. This is not a footnote. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/headers.html�������������������������������������0100755�0000766�0000024�00000000313�13712061256�0023202�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<h1 id='a_title_with_emphasis'>A title with <em>emphasis</em></h1> <h2 id='a_title_with_emphasis'>A title with <em>emphasis</em></h2> <h4 id='a_title_with_emphasis'>A title with <em>emphasis</em></h4> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/headers.text�������������������������������������0100755�0000766�0000024�00000000210�13712061256�0023216�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������A title with *emphasis* ======================= A title with *emphasis* ----------------------- #### A title with *emphasis* #### ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/hex_entities.html��������������������������������0100755�0000766�0000024�00000000313�13712061256�0024257�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Examples of numeric character references include © or © for the copyright symbol, Α or Α for the Greek capital letter alpha, and ا or ا for the Arabic letter alef.</p> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/hex_entities.text��������������������������������0100755�0000766�0000024�00000000307�13712061256�0024302�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Examples of numeric character references include © or © for the copyright symbol, Α or Α for the Greek capital letter alpha, and ا or ا for the Arabic letter alef. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/hrule.html���������������������������������������0100755�0000766�0000024�00000000037�13712061256�0022711�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<hr /><hr /><hr /><hr /><hr /> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/hrule.text���������������������������������������0100755�0000766�0000024�00000000007�13712061256�0022726�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������* * * �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/html2.html���������������������������������������0100755�0000766�0000024�00000000036�13712061256�0022617�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>One <div />123</p> <div /> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/html2.text���������������������������������������0100755�0000766�0000024�00000000043�13712061256�0022635�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������One <div></div>123 <div></div>123 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/html3.html���������������������������������������0100755�0000766�0000024�00000000511�13712061256�0022616�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>taking part in <a href='http://sied.dis.uniroma1.it/'>some arcane conspirations</a> which involve <b href='http://www.flickr.com/photos/censi/70893277/'>coffee</b>, <a href='http://flickr.com/photos/censi/42775664/in/set-936677/'>robots</a>, <a href='http://www.flickr.com/photos/censi/42775888/in/set-936677/'>sushi</a>,</p> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/html3.text���������������������������������������0100755�0000766�0000024�00000000504�13712061256�0022640�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������taking part in <a href="http://sied.dis.uniroma1.it/">some arcane conspirations</a> which involve <b href="http://www.flickr.com/photos/censi/70893277/">coffee</b>, <a href="http://flickr.com/photos/censi/42775664/in/set-936677/">robots</a>, <a href="http://www.flickr.com/photos/censi/42775888/in/set-936677/">sushi</a>, ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/html4.html���������������������������������������0100755�0000766�0000024�00000000307�13712061256�0022622�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<div class='frame'> <a href='http://www.flickr.com/photos/censi/54757256/' class='photo'><img src='http://static.flickr.com/27/54757256_1a2c1d2a95_m.jpg' moz-do-not-send='true' alt='' /></a> </div> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/html4.text���������������������������������������0100755�0000766�0000024�00000000316�13712061256�0022642�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<div class="frame"> <a class="photo" href="http://www.flickr.com/photos/censi/54757256/"><img alt="" moz-do-not-send="true" src="http://static.flickr.com/27/54757256_1a2c1d2a95_m.jpg" /></a> </div> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/html5.html���������������������������������������0100755�0000766�0000024�00000000351�13712061256�0022622�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<div class='frame'> <a href='http://www.flickr.com/photos/censi/88561568/' class='photo'><img src='http://static.flickr.com/28/88561568_ab84d28245_m.jpg' height='180' moz-do-not-send='true' alt='Aperitif' width='240' /></a> </div> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/html5.text���������������������������������������0100755�0000766�0000024�00000000355�13712061256�0022646�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ <div class="frame"> <a class="photo" href="http://www.flickr.com/photos/censi/88561568/" ><img moz-do-not-send="true" src="http://static.flickr.com/28/88561568_ab84d28245_m.jpg" width="240" height="180" alt="Aperitif" /></a> </div> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/ie.html������������������������������������������0100755�0000766�0000024�00000001277�13712061256�0022176�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p><code><p>here's an apostrophe & a quote "</p></code></p> <pre><code><p>here's an apostrophe & a quote "</p></code></pre> <pre lang='xml'><code class='xml' lang='xml'><p>here's an apostrophe & a quote "</p></code></pre> <pre><code class='not_supported' lang='not_supported'><p>here's an apostrophe & a quote "</p></code></pre> <pre><code class='xml' lang='xml'><span class='punct'><</span><span class='tag'>p</span><span class='punct'>></span>here's an apostrophe & a quote "<span class='punct'></</span><span class='tag'>p</span><span class='punct'>></span></code></pre> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/ie.text������������������������������������������0100755�0000766�0000024�00000000460�13712061256�0022207�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������`<p>here's an apostrophe & a quote "</p>` <p>here's an apostrophe & a quote "</p> {:} <p>here's an apostrophe & a quote "</p> {:lang=xml} <p>here's an apostrophe & a quote "</p> {:html_use_syntax=true lang=not_supported} <p>here's an apostrophe & a quote "</p> {:html_use_syntax=true lang=xml} ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/images.html��������������������������������������0100755�0000766�0000024�00000001227�13712061256�0023041�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This page does not uilizes <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p> <p>Please mouseover to see the title: <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p> <p>Please mouseover to see the title: <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p> <p>I’ll say it one more time: this page does not use <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p> <p>This is double size: <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/images.text��������������������������������������0100755�0000766�0000024�00000001314�13712061256�0023056�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ This page does not uilizes ![Cascading Style Sheets](http://jigsaw.w3.org/css-validator/images/vcss) Please mouseover to see the title: ![Cascading Style Sheets](http://jigsaw.w3.org/css-validator/images/vcss "Title ok!") Please mouseover to see the title: ![Cascading Style Sheets](http://jigsaw.w3.org/css-validator/images/vcss 'Title ok!') I'll say it one more time: this page does not use ![Cascading Style Sheets] [css] This is double size: ![Cascading Style Sheets] [css2] [css]: http://jigsaw.w3.org/css-validator/images/vcss "Optional title attribute" [css2]: http://jigsaw.w3.org/css-validator/images/vcss "Optional title attribute" class=external style="border:0;width:188px;height:131px" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/images2.html�������������������������������������0100755�0000766�0000024�00000000157�13712061256�0023124�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This is an <img src='image.jpg' alt='image' />.</p> <p>This is an <img src='image.jpg' alt='image' />.</p> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/images2.text�������������������������������������0100755�0000766�0000024�00000000103�13712061256�0023133�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ This is an ![image][]. This is an ![image]. [image]: image.jpg �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/inline_html.html���������������������������������0100755�0000766�0000024�00000002631�13712061256�0024076�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Input:</p> <pre><code><em>Emphasis</em></code></pre> <p>Result: <em>Emphasis</em></p> <p>Input:</p> <pre><code><img src="http://jigsaw.w3.org/css-validator/images/vcss"/></code></pre> <p>Result on span: <img src='http://jigsaw.w3.org/css-validator/images/vcss' /></p> <p>Result alone:</p> <img src='http://jigsaw.w3.org/css-validator/images/vcss' /> <p>Without closing:</p> <img src='http://jigsaw.w3.org/css-validator/images/vcss' /><div> <p> <p>This is</p> <em> <p>true</p> </em> <p>markdown text (paragraph)</p> </p> <p> <p> <p>This is</p> <em> <p>true</p> </em> <p>markdown text (no paragraph)</p> </p> </p> <p> <p> <p>This is</p> <em> <p>true</p> </em> <p>markdown text (block paragraph)</p> </p> </p> </div><table> <tr> <td> <p>This is</p> <em> <p>true</p> </em> <p>markdown text. (no par)</p> </td> <td> <p>This is</p> <em> <p>true</p> </em> <p>markdown text. (par)</p> </td> </tr> </table> <p>The following is invalid HTML, and will generate an error:</p> <pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error: <table> <td markdown="1">This is *true* markdown text. (no par)</td> <td markdown="block">This is *true* markdown text. (par)</td> </tr></pre><pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error: </table></pre> �������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/inline_html.text���������������������������������0100755�0000766�0000024�00000001667�13712061256�0024126�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������CSS: style.css Input: <em>Emphasis</em> Result: <em>Emphasis</em> Input: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/> Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/> Result alone: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/> Without closing: <img src="http://jigsaw.w3.org/css-validator/images/vcss"> <div markdown="1"> This is *true* markdown text (paragraph) <p markdown="1"> This is *true* markdown text (no paragraph) </p> <p markdown="block"> This is *true* markdown text (block paragraph) </p> </div> <table> <tr> <td markdown="1">This is *true* markdown text. (no par)</td> <td markdown="block">This is *true* markdown text. (par)</td> </tr> </table> The following is invalid HTML, and will generate an error: <table> <td markdown="1">This is *true* markdown text. (no par)</td> <td markdown="block">This is *true* markdown text. (par)</td> </tr> </table> �������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/inline_html2.html��������������������������������0100755�0000766�0000024�00000000120�13712061256�0024147�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<div> <p>Test <strong>bold</strong></p> </div><p>Test <strong>bold</strong></p> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/inline_html2.text��������������������������������0100755�0000766�0000024�00000000110�13712061256�0024166�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<div markdown="1">Test **bold**</div> <p markdown="1">Test **bold**</p> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/links.html���������������������������������������0100755�0000766�0000024�00000001654�13712061256�0022720�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Search on <a href='http://www.google.com'>Google</a></p> <p>Search on <a href='http://www.google.com'>Google</a></p> <p>Search on <a href='http://www.google.com'>Google</a></p> <p>Search on <a href='http://www.google.com'>Google</a></p> <p>Search on <a href='http://images.google.com' title='Google images'>Google images</a></p> <p>Inline: <a href='http://google.com'>Google images</a></p> <p>Inline with title: <a href='http://google.com' title='Title'>Google images</a></p> <p>Inline with title: <a href='http://google.com' title='Title'>Google images</a></p> <p>Search on <a href='http://www.gogole.com'>http://www.gogole.com</a> or <a href='http://Here.com'>http://Here.com</a> or ask <a href='mailto:bill@google.com'>bill@google.com</a> or you might ask bill@google.com.</p> <p>If all else fails, ask <a href='http://www.google.com'>Google</a></p> ������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/links.text���������������������������������������0100755�0000766�0000024�00000001422�13712061256�0022731�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ Search on [Google][] Search on [Google] [] Search on [Google] [google] Search on [Google] [Google] Search on [Google images][] Inline: [Google images](http://google.com) Inline with title: [Google images](http://google.com "Title") Inline with title: [Google images]( http://google.com "Title" ) Search on <http://www.gogole.com> or <http://Here.com> or ask <mailto:bill@google.com> or you might ask bill@google.com. If all else fails, ask [Google](http://www.google.com) [google]: http://www.google.com [google2]: http://www.google.com 'Single quotes' [google3]: http://www.google.com "Double quotes" [google4]: http://www.google.com (Parenthesis) [Google Search]: http://www.google.com "Google search" [Google Images]: http://images.google.com (Google images) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/list1.html���������������������������������������0100755�0000766�0000024�00000000210�13712061256�0022617�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ul> <li> <p>A list item with a blockquote:</p> <blockquote> <p>This is a blockquote inside a list item.</p> </blockquote> </li> </ul> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/list1.text���������������������������������������0100755�0000766�0000024�00000000132�13712061256�0022642�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������* A list item with a blockquote: > This is a blockquote > inside a list item. ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/list2.html���������������������������������������0100755�0000766�0000024�00000000405�13712061256�0022626�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ul> <li> <p>This is a list item with two paragraphs.</p> <p>This is the second paragraph in the list item. You’re only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> </li> <li> <p>other</p> </li> </ul> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/list2.text���������������������������������������0100755�0000766�0000024�00000000326�13712061256�0022650�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������* This is a list item with two paragraphs. This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. * other ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/list3.html���������������������������������������0100755�0000766�0000024�00000000352�13712061256�0022630�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ul> <li> <p>A list item with a blockquote:</p> <blockquote> <p>This is a blockquote inside a list item.</p> </blockquote> </li> <li> <p>A list item with a code block:</p> <pre><code><code goes here></code></pre> </li> </ul> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/list3.text���������������������������������������0100755�0000766�0000024�00000000227�13712061256�0022651�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������* A list item with a blockquote: > This is a blockquote > inside a list item. * A list item with a code block: <code goes here> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/list4.html���������������������������������������0100755�0000766�0000024�00000000317�13712061256�0022632�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This is a list:</p> <ul> <li>one</li> <li>two</li> </ul> <p>This is not a list: * one ciao</p> <p>This is a list:</p> <ol> <li>one</li> <li>two</li> </ol> <p>This is not a list: 1987. one ciao</p> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/list4.text���������������������������������������0100755�0000766�0000024�00000000200�13712061256�0022641�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is a list: * one * two This is not a list: * one ciao This is a list: 1. one 1. two This is not a list: 1987. one ciao ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists.html���������������������������������������0100755�0000766�0000024�00000002366�13712061256�0022737�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ul> <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.</li> <li>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.</li> <li>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.</li> <li>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.</li> <li>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.</li> </ul> <p>Ancora</p> <ul> <li> <p>This is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.</p> <p>ATTENZIONE!</p> </li> <li> <p>Suspendisse id sem consectetuer libero luctus adipiscing.</p> </li> </ul> <p>Ancora</p> <ul> <li> <p>This is a list item with two paragraphs.</p> <p>This is the second paragraph in the list item. You’re only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> </li> <li> <p>Another item in the same list.</p> </li> </ul> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists.text���������������������������������������0100755�0000766�0000024�00000002173�13712061256�0022753�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������* 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. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. Ancora * This is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. ATTENZIONE! * Suspendisse id sem consectetuer libero luctus adipiscing. Ancora * This is a list item with two paragraphs. This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. * Another item in the same list. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists11.html�������������������������������������0100755�0000766�0000024�00000000020�13712061256�0023062�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>- ένα</p> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists11.text�������������������������������������0100755�0000766�0000024�00000000012�13712061256�0023103�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������- ένα ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists6.html��������������������������������������0100755�0000766�0000024�00000000001�13712061256�0023005�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists6.text��������������������������������������0100755�0000766�0000024�00000000001�13712061256�0023025�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists7.html��������������������������������������0100755�0000766�0000024�00000000061�13712061256�0023014�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Ciao</p> <ul> <li>Tab * Tab * Tab</li> </ul> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists7.text��������������������������������������0100755�0000766�0000024�00000000034�13712061256�0023034�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Ciao * Tab * Tab * Tab ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists7b.html�������������������������������������0100755�0000766�0000024�00000000122�13712061256�0023154�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ul> <li> a <ul> <li>a1</li> <li>a2</li> </ul> </li> <li> <p>b</p> </li> </ul> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists7b.text�������������������������������������0100755�0000766�0000024�00000000030�13712061256�0023172�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������* a * a1 * a2 * b ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists8.html��������������������������������������0100755�0000766�0000024�00000000132�13712061256�0023014�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Here is a paragraph.</p> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists8.text��������������������������������������0100755�0000766�0000024�00000000074�13712061256�0023041�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Here is a paragraph. * Item 1 * Item 2 * Item 3 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists9.html��������������������������������������0100755�0000766�0000024�00000000155�13712061256�0023022�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ul> <li> <p>Due</p> <ol> <li>tre</li> <li>tre</li> <li>tre</li> </ol> </li> <li> <p>Due</p> </li> </ul> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists9.text��������������������������������������0100755�0000766�0000024�00000000047�13712061256�0023042�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������- Due 1. tre 1. tre 1. tre - Due �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists_after_paragraph.html�����������������������0100755�0000766�0000024�00000001615�13712061256�0026141�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Paragraph, list with no space: * ciao</p> <p>Paragraph, list with 1 space: * ciao</p> <p>Paragraph, list with 3 space: * ciao</p> <p>Paragraph, list with 4 spaces: * ciao</p> <p>Paragraph, list with 1 tab: * ciao</p> <p>Paragraph (1 space after), list with no space: * ciao</p> <p>Paragraph (2 spaces after), list with no space:<br />* ciao</p> <p>Paragraph (3 spaces after), list with no space: <br />* ciao</p> <p>Paragraph with block quote:</p> <blockquote> <p>Quoted</p> </blockquote> <p>Paragraph with header:</p> <h3 id='header'>header</h3> <p>Paragraph with header on two lines:</p> <h2 id='header'>header</h2> <p>Paragraph with html after <div /></p> <p>Paragraph with html after, indented: <em>Emphasis</em></p> <p>Paragraph with html after, indented: <em>Emphasis</em> <em>tralla</em> <em>Emph</em></p> <p>Paragraph with html after, indented: <em>Emphasis *tralla* Emph</em></p> �������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists_after_paragraph.text�����������������������0100755�0000766�0000024�00000001356�13712061256�0026163�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Paragraph, list with no space: * ciao Paragraph, list with 1 space: * ciao Paragraph, list with 3 space: * ciao Paragraph, list with 4 spaces: * ciao Paragraph, list with 1 tab: * ciao Paragraph (1 space after), list with no space: * ciao Paragraph (2 spaces after), list with no space: * ciao Paragraph (3 spaces after), list with no space: * ciao Paragraph with block quote: > Quoted Paragraph with header: ### header ### Paragraph with header on two lines: header ------ Paragraph with html after <div></div> Paragraph with html after, indented: <em>Emphasis</em> Paragraph with html after, indented: <em>Emphasis</em> *tralla* <em>Emph</em> Paragraph with html after, indented: <em>Emphasis *tralla* Emph</em> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists_ol.html������������������������������������0100755�0000766�0000024�00000002573�13712061256�0023431�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ol> <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.</li> <li>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.</li> <li>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.</li> <li>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.</li> <li>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.</li> </ol> <p>Ancora</p> <ol> <li> <p>This is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.</p> <p>ATTENZIONE!</p> <ul> <li> <p>Uno</p> </li> <li> <p>Due</p> <ol> <li>tre</li> <li>tre</li> <li>tre</li> </ol> </li> <li> <p>Due</p> </li> </ul> </li> <li> <p>Suspendisse id sem consectetuer libero luctus adipiscing.</p> </li> </ol> <p>Ancora</p> <ul> <li> <p>This is a list item with two paragraphs.</p> <p>This is the second paragraph in the list item. You’re only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> </li> <li> <p>Another item in the same list.</p> </li> </ul> �������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/lists_ol.text������������������������������������0100755�0000766�0000024�00000002310�13712061256�0023436�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. 2. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. 3. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. 3. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. 4. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. Ancora 1. This is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. ATTENZIONE! - Uno - Due 1. tre 1. tre 1. tre - Due 2. Suspendisse id sem consectetuer libero luctus adipiscing. Ancora * This is a list item with two paragraphs. This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. * Another item in the same list. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/loss.html����������������������������������������0100755�0000766�0000024�00000000007�13712061256�0022547�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<br /> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/loss.text����������������������������������������0100755�0000766�0000024�00000000012�13712061256�0022563�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<br/>123 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/misc_sw.html�������������������������������������0100755�0000766�0000024�00000010320�13712061256�0023232�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<h3 id='general'>General</h3> <ul> <li><em>Operating System</em> : <a href='http://www.apple.com/getamac/'>Mac OS X</a>: heaven, after the purgatory of Linux and the hell of Windows.</li> <li><em>Browser</em>: <a href='http://getfirefox.com/'>Firefox</a>. On a Mac, <a href='http://www.caminobrowser.org/'>Camino</a>.</li> <li><em>Email</em>: <a href='http://gmail.com/'>GMail</a>, “search, don’t sort” really works.</li> <li><em>Text Editor</em>: <a href='http://www.apple.com/getamac/'>TextMate</a>, you have to buy it, but it’s worth every penny. There are rumours that it’s been converting (recovering) Emacs users (addicts). Unfortunately, it’s Mac only. An alternative is <a href='http://www.jedit.org/'>jedit</a> (GPL, Java).</li> </ul> <h3 id='development'>Development</h3> <ul> <li> <p><em>Build system</em>: <a href='http://www.cmake.org/'>cmake</a>, throw the <a href='http://sources.redhat.com/autobook/'>autotools</a> away.</p> </li> <li> <p><em>Source code control system</em>: ditch CVS for <a href='http://subversion.tigris.org'>subversion</a>.</p> </li> <li> <p><em>Project management</em>: <a href='http://trac.edgewall.org/'>Trac</a> tracks everything.</p> </li> <li> <p><em>Scripting language</em>: <a href='http://www.ruby-lang.org/'>Ruby</a> is Japanese pragmatism (and has a <a href='http://poignantguide.net/ruby/'>poignant</a> guide). Python, you say? Python is too academic and snob:</p> <pre><code>$ python Python 2.4.1 (\#1, Jun 4 2005, 00:54:33) Type "help", "copyright", "credits" or "license" for more information. >>> exit 'Use Ctrl-D (i.e. EOF) to exit.' >>> quit 'Use Ctrl-D (i.e. EOF) to exit.'</code></pre> </li> <li> <p><em>Java IDE</em>: <a href='http://www.borland.com/us/products/jbuilder/index.html'>JBuilder</a> is great software and has a free version (IMHO better than Eclipse). Java is not a pain anymore since it gained <a href='http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html'>generics</a> and got opensourced.</p> </li> <li> <p><em>Mark-up language</em>: HTML is so 2001, why don’t you take at look at <a href='http://en.wikipedia.org/wiki/Markdown'>Markdown</a>? <a href='data/misc_markdown.png'>Look at the source of this page</a>.</p> </li> <li> <p><em>C++ libraries</em>: * <a href='http://www.trolltech.no/'>QT</a> for GUIs. * <a href='http://www.gnu.org/software/gsl/'>GSL</a> for math. * <a href='http://www.imagemagick.org/Magick++/'>Magick++</a> for manipulating images. * <a href='http://cairographics.org/'>Cairo</a> for creating PDFs. * <a href='http://www.boost.org/'>Boost</a> for just about everything else.</p> </li> </ul> <h3 id='research'>Research</h3> <ul> <li><em>Writing papers</em>: <a href='http://en.wikipedia.org/wiki/LaTeX'>LaTeX</a></li> <li><em>Writing papers & enjoying the process</em>: <a href='http://www.lyx.org'>LyX</a></li> <li><em>Handsome figures in your papers</em>: <a href='http://www.xfig.org/'>xfig</a> or, better, <a href='http://tams-www.informatik.uni-hamburg.de/applets/jfig/'>jfig</a>.</li> <li><em>The occasional presentation with many graphical content</em>: <a href='http://www.openoffice.org/product/impress.html'>OpenOffice Impress</a> (using the <a href='http://ooolatex.sourceforge.net/'>OOOlatex plugin</a>); the alternative is PowerPoint with the <a href='http://texpoint.necula.org/'>TexPoint</a> plugin.</li> <li><em>Managing BibTeX</em>: <a href='http://jabref.sourceforge.net/'>jabref</a>: multi-platform, for all your bibtex needs.</li> <li><em>IEEExplore and BibTeX</em>: convert citations using <a href='http://www.bibconverter.net/ieeexplore/'>BibConverter</a>.</li> </ul> <h3 id='cool_websites'>Cool websites</h3> <ul> <li><em>Best site in the wwworld</em>: <a href='http://en.wikipedia.org/'>Wikipedia</a></li> <li><a href='http://www.mutopiaproject.org/'>Mutopia</a> for sheet music; <a href='http://www.gutenberg.org/'>the Gutenberg Project</a> for books; <a href='http://www.liberliber.it/'>LiberLiber</a> for books in italian.</li> <li><em>Blogs</em>: <a href='http://bloglines.com/'>Bloglines</a></li> <li><em>Sharing photos</em>: <a href='http://www.flickr.com/'>flickr</a> exposes an API you can use.</li> </ul> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/misc_sw.text�������������������������������������0100755�0000766�0000024�00000010544�13712061256�0023262�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Subject: Software not painful to use Subject_short: painless software Topic: /misc/coolsw Archive: no Date: Nov 20 2006 Order: -9.5 inMenu: true ### General ### * *Operating System* : [Mac OS X][switch]: heaven, after the purgatory of Linux and the hell of Windows. * *Browser*: [Firefox][firefox]. On a Mac, [Camino][camino]. * *Email*: [GMail][gmail], "search, don't sort" really works. * *Text Editor*: [TextMate][textmate], you have to buy it, but it's worth every penny. There are rumours that it's been converting (recovering) Emacs users (addicts). Unfortunately, it's Mac only. An alternative is [jedit][jedit] (GPL, Java). ### Development ### * *Build system*: [cmake][cmake], throw the [autotools][autotools] away. * *Source code control system*: ditch CVS for [subversion][subversion]. * *Project management*: [Trac][trac] tracks everything. * *Scripting language*: [Ruby][ruby] is Japanese pragmatism (and has a [poignant][poignant] guide). Python, you say? Python is too academic and snob: $ python Python 2.4.1 (\#1, Jun 4 2005, 00:54:33) Type "help", "copyright", "credits" or "license" for more information. >>> exit 'Use Ctrl-D (i.e. EOF) to exit.' >>> quit 'Use Ctrl-D (i.e. EOF) to exit.' * *Java IDE*: [JBuilder][jbuilder] is great software and has a free version (IMHO better than Eclipse). Java is not a pain anymore since it gained [generics][java-generics] and got opensourced. * *Mark-up language*: HTML is so 2001, why don't you take at look at [Markdown][markdown]? [Look at the source of this page](data/misc_markdown.png). * *C++ libraries*: * [QT][qt] for GUIs. * [GSL][gsl] for math. * [Magick++][magick] for manipulating images. * [Cairo][cairo] for creating PDFs. * [Boost][boost] for just about everything else. ### Research ### * *Writing papers*: [LaTeX][latex] * *Writing papers & enjoying the process*: [LyX][lyx] * *Handsome figures in your papers*: [xfig][xfig] or, better, [jfig][jfig]. * *The occasional presentation with many graphical content*: [OpenOffice Impress][impress] (using the [OOOlatex plugin][ooolatex]); the alternative is PowerPoint with the [TexPoint][texpoint] plugin. * *Managing BibTeX*: [jabref][jabref]: multi-platform, for all your bibtex needs. * *IEEExplore and BibTeX*: convert citations using [BibConverter][bibconverter]. ### Cool websites ### * *Best site in the wwworld*: [Wikipedia][wikipedia] * [Mutopia][mutopia] for sheet music; [the Gutenberg Project][gutenberg] for books; [LiberLiber][liberliber] for books in italian. * *Blogs*: [Bloglines][bloglines] * *Sharing photos*: [flickr][flickr] exposes an API you can use. [firefox]: http://getfirefox.com/ [gmail]: http://gmail.com/ [bloglines]: http://bloglines.com/ [wikipedia]: http://en.wikipedia.org/ [ruby]: http://www.ruby-lang.org/ [poignant]: http://poignantguide.net/ruby/ [webgen]: http://webgen.rubyforge.org/ [markdown]: http://daringfireball.net/projects/markdown/ [latex]: http://en.wikipedia.org/wiki/LaTeX [lyx]: http://www.lyx.org [impress]: http://www.openoffice.org/product/impress.html [ooolatex]: http://ooolatex.sourceforge.net/ [texpoint]: http://texpoint.necula.org/ [jabref]: http://jabref.sourceforge.net/ [camino]: http://www.caminobrowser.org/ [switch]: http://www.apple.com/getamac/ [textmate]: http://www.apple.com/getamac/ [cmake]: http://www.cmake.org/ [xfig]: http://www.xfig.org/ [jfig]: http://tams-www.informatik.uni-hamburg.de/applets/jfig/ [subversion]: http://subversion.tigris.org [jbuilder]: http://www.borland.com/us/products/jbuilder/index.html [flickr]: http://www.flickr.com/ [myflickr]: http://www.flickr.com/photos/censi [bibconverter]: http://www.bibconverter.net/ieeexplore/ [autotools]: http://sources.redhat.com/autobook/ [jedit]: http://www.jedit.org/ [qt]: http://www.trolltech.no/ [gsl]: http://www.gnu.org/software/gsl/ [magick]: http://www.imagemagick.org/Magick++/ [cairo]: http://cairographics.org/ [boost]: http://www.boost.org/ [markdown]: http://en.wikipedia.org/wiki/Markdown [trac]: http://trac.edgewall.org/ [mutopia]: http://www.mutopiaproject.org/ [liberliber]: http://www.liberliber.it/ [gutenberg]: http://www.gutenberg.org/ [java-generics]: http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html ������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/olist.html���������������������������������������0100755�0000766�0000024�00000000116�13712061256�0022722�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This is a list:</p> <ol> <li>one</li> <li>two</li> <li>three</li> </ol> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/olist.text���������������������������������������0100755�0000766�0000024�00000000050�13712061256�0022737�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is a list: 2. one 2. two 3. three ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/one.html�����������������������������������������0100755�0000766�0000024�00000000020�13712061256�0022343�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>One line</p> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/one.text�����������������������������������������0100755�0000766�0000024�00000000011�13712061256�0022363�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������One line �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/paragraph.html�����������������������������������0100755�0000766�0000024�00000000021�13712061256�0023530�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Paragraph</p> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/paragraph.text�����������������������������������0100755�0000766�0000024�00000000013�13712061256�0023551�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Paragraph ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/paragraphs.html����������������������������������0100755�0000766�0000024�00000000152�13712061256�0023720�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3 Paragraph 4 Paragraph Br-><br />Paragraph 5</p> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/paragraphs.text����������������������������������0100755�0000766�0000024�00000000122�13712061256�0023735�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Paragraph 1 Paragraph 2 Paragraph 3 Paragraph 4 Paragraph Br-> Paragraph 5 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/smartypants.html���������������������������������0100755�0000766�0000024�00000001221�13712061256�0024153�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<pre><code>'Twas a "test" to 'remember' in the '90s.</code></pre> <p>‘Twas a “test” to ‘remember’ in the ’90s.</p> <pre><code>It was --- in a sense --- really... interesting.</code></pre> <p>It was — in a sense — really… interesting.</p> <pre><code>I -- too -- met << some curly quotes >> there or <<here>>No space.</code></pre> <p>I – too – met « some curly quotes » there or «here»No space.</p> <pre><code>She was 6\"12\'.</code></pre> <blockquote> <p>She was 6"12'.</p> </blockquote> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/smartypants.text���������������������������������0100755�0000766�0000024�00000000552�13712061256�0024201�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ 'Twas a "test" to 'remember' in the '90s. 'Twas a "test" to 'remember' in the '90s. It was --- in a sense --- really... interesting. It was --- in a sense --- really... interesting. I -- too -- met << some curly quotes >> there or <<here>>No space. I -- too -- met << some curly quotes >> there or <<here>>No space. She was 6\"12\'. > She was 6\"12\'. ������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/syntax_hl.html�����������������������������������0100755�0000766�0000024�00000000571�13712061256�0023606�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This is ruby code:</p> <pre><code>require 'maruku' puts Maruku.new($stdin).to_html</code></pre> <p>This is ruby code:</p> <pre><code class='ruby' lang='ruby'><span class='ident'>require</span> <span class='punct'>'</span><span class='string'>maruku</span><span class='punct'>'</span></code></pre> <pre><code>puts Maruku.new($stdin).to_html</code></pre> ���������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/syntax_hl.text�����������������������������������0100755�0000766�0000024�00000000261�13712061256�0023622�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is ruby code: require 'maruku' puts Maruku.new($stdin).to_html This is ruby code: require 'maruku' {: lang=ruby html_use_syntax} puts Maruku.new($stdin).to_html �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/table_attributes.html����������������������������0100755�0000766�0000024�00000000471�13712061256�0025131�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<table cellspacing='2em' class='class1' border='3' rules='cols' frame='lhs' summary='Table summary' cellpadding='4px' width='50%' style='color:red'><thead><tr><th>h</th><th>h</th></tr></thead><tbody><tr><th scope='row' style='text-align: left;'> c1</th><td style='text-align: left;'>c2</td> </tr></tbody></table> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/table_attributes.text����������������������������0100755�0000766�0000024�00000000300�13712061256�0025140�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ h | h ----------|-- {:t} c1 | c2 {: summary="Table summary" .class1 style="color:red" border=3 width="50%" frame=lhs rules=cols cellspacing=2em cellpadding=4px} {:t: scope="row"} ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/test.html����������������������������������������0100755�0000766�0000024�00000000057�13712061256�0022553�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<pre><code> $ python </code></pre> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/test.text����������������������������������������0100755�0000766�0000024�00000000037�13712061256�0022571�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ $ python �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/wrapping.html������������������������������������0100755�0000766�0000024�00000001127�13712061256�0023422�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:<br />Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet.</p> <ul> <li>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break:<br />Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet</li> <li>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet</li> </ul> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/wrapping.text������������������������������������0100755�0000766�0000024�00000001066�13712061256�0023444�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break: Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. * Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break: Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet * Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/xml.html�����������������������������������������0100755�0000766�0000024�00000000353�13712061256�0022373�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<svg:svg /><svg:svg height='400px' width='600px'> <svg:g id='group'> <svg:circle cy='3cm' id='circ1' r='1cm' cx='3cm' style='fill:red;' /> <svg:circle cy='3cm' id='circ2' r='1cm' cx='7cm' style='fill:red;' /> </svg:g> </svg:svg> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/xml.text�����������������������������������������0100755�0000766�0000024�00000000372�13712061256�0022414�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ <svg:svg/> <svg:svg width="600px" height="400px"> <svg:g id="group"> <svg:circle id="circ1" r="1cm" cx="3cm" cy="3cm" style="fill:red;"></svg:circle> <svg:circle id="circ2" r="1cm" cx="7cm" cy="3cm" style="fill:red;" /> </svg:g> </svg:svg> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/xml2.html����������������������������������������0100755�0000766�0000024�00000000013�13712061256�0022446�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- < --> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/xml2.text����������������������������������������0100755�0000766�0000024�00000000013�13712061256�0022466�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- < --> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/xml3.html����������������������������������������0100755�0000766�0000024�00000000075�13712061256�0022457�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<table>Blah<thead> <td><em>em</em></td> </thead> </table> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/xml3.text����������������������������������������0100755�0000766�0000024�00000000110�13712061256�0022465�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<table markdown='1'> Blah <thead> <td>*em*</td> </thead> </table> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/xml_instruction.html�����������������������������0100755�0000766�0000024�00000000220�13712061256�0025025�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<? noTarget?><?php ?><?xml ?><?mrk ?> <p>Targets <? noTarget?> <?php ?> <?xml ?> <?mrk ?></p> <p>Inside: <?mrk puts "Inside: Hello"?> last</p> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-maruku-unittest/xml_instruction.text�����������������������������0100755�0000766�0000024�00000000215�13712061256�0025051�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ <? noTarget?> <?php ?> <?xml ?> <?mrk ?> Targets <? noTarget?> <?php ?> <?xml ?> <?mrk ?> Inside: <?mrk puts "Inside: Hello" ?> last �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Backslash_escapes.html������������������������������0100755�0000766�0000024�00000000234�13712061256�0024415�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Tricky combinaisons:</p> <p>backslash with \-- two dashes</p> <p>backslash with \> greater than</p> <p>\[test](not a link)</p> <p>\*no emphasis*</p> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Backslash_escapes.text������������������������������0100755�0000766�0000024�00000000176�13712061256�0024442�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Tricky combinaisons: backslash with \\-- two dashes backslash with \\> greater than \\\[test](not a link) \\\*no emphasis*��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Code_Spans.html�������������������������������������0100755�0000766�0000024�00000000217�13712061256�0023036�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>From <code><!--</code> to <code>--></code> on two lines.</p> <p>From <code><!--</code> to <code>--></code> on three lines.</p> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Code_Spans.text�������������������������������������0100755�0000766�0000024�00000000111�13712061256�0023047�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������From `<!--` to `-->` on two lines. From `<!--` to `-->` on three lines. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Code_block_in_a_list_item.html����������������������0100755�0000766�0000024�00000000172�13712061256�0026103�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ul> <li><p>List Item:</p> <pre><code>code block with a blank line </code></pre> <p>within a list item.</p></li> </ul>������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Code_block_in_a_list_item.text����������������������0100755�0000766�0000024�00000000106�13712061256�0026120�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ * List Item: code block with a blank line within a list item.����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Headers.html����������������������������������������0100755�0000766�0000024�00000000512�13712061256�0022371�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<h1>Header</h1> <h2>Header</h2> <h3>Header</h3> <hr /> <h1>Header</h1> <p>Paragraph</p> <h2>Header</h2> <p>Paragraph</p> <h3>Header</h3> <p>Paragraph</p> <hr /> <p>Paragraph</p> <h1>Header</h1> <p>Paragraph</p> <p>Paragraph</p> <h2>Header</h2> <p>Paragraph</p> <p>Paragraph</p> <h3>Header</h3> <p>Paragraph</p> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Headers.text����������������������������������������0100755�0000766�0000024�00000000346�13712061256�0022416�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Header ====== Header ------ ### Header - - - Header ====== Paragraph Header ------ Paragraph ### Header Paragraph - - - Paragraph Header ====== Paragraph Paragraph Header ------ Paragraph Paragraph ### Header Paragraph������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Images_(Untitled).html������������������������������0100755�0000766�0000024�00000000200�13712061256�0024206�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p><img src="/url/" alt="alt text" /></p> <p><img src="/url/" alt="alt text" /></p> <p><img src="/url/" alt="alt text" /></p> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Images_(Untitled).text������������������������������0100755�0000766�0000024�00000000112�13712061256�0024230�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������![alt text](/url/) ![alt text](</url/>) ![alt text][foo] [foo]: /url/������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Inline_HTML_(Simple).html���������������������������0100755�0000766�0000024�00000000234�13712061256�0024513�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>With some attributes:</p> <div id="test"> foo </div> <div id="test" class="nono"> foo </div> <p>Hr's:</p> <hr class="foo" id="bar" >��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Inline_HTML_(Simple).text���������������������������0100755�0000766�0000024�00000000212�13712061256�0024527�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������With some attributes: <div id="test"> foo </div> <div id="test" class="nono"> foo </div> Hr's: <hr class="foo" id="bar" > ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Inline_HTML_comments.html���������������������������0100755�0000766�0000024�00000000212�13712061256�0024762�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Paragraph one.</p> <!-- double--dash (invalid SGML comment) --> <p>Paragraph two.</p> <!-- enclosed tag </div> --> <p>The end.</p> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Inline_HTML_comments.text���������������������������0100755�0000766�0000024�00000000165�13712061256�0025011�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Paragraph one. <!-- double--dash (invalid SGML comment) --> Paragraph two. <!-- enclosed tag </div> --> The end. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/PHP-Specific_Bugs.html������������������������������0100755�0000766�0000024�00000001066�13712061256�0024155�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This tests for a bug where quotes escaped by PHP when using <code>preg_replace</code> with the <code>/e</code> modifier must be correctly unescaped (hence the <code>_UnslashQuotes</code> function found only in PHP Markdown).</p> <p>Headers below should appear exactly as they are typed (no backslash added or removed).</p> <h1>Header "quoted\" again \""</h1> <h2>Header "quoted\" again \""</h2> <h3>Header "quoted\" again \""</h3> <p>Test with tabs for <code>_Detab</code>:</p> <pre><code>Code 'block' with some "tabs" and "quotes" </code></pre> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/PHP-Specific_Bugs.text������������������������������0100755�0000766�0000024�00000000777�13712061256�0024205�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This tests for a bug where quotes escaped by PHP when using `preg_replace` with the `/e` modifier must be correctly unescaped (hence the `_UnslashQuotes` function found only in PHP Markdown). Headers below should appear exactly as they are typed (no backslash added or removed). Header "quoted\" again \\"" =========================== Header "quoted\" again \\"" --------------------------- ### Header "quoted\" again \\"" ### Test with tabs for `_Detab`: Code 'block' with some "tabs" and "quotes" �markdown-0.3.0/tests/fixtures/docs-php-markdown/Tight_blocks.html�����������������������������������0100755�0000766�0000024�00000000450�13712061256�0023433�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Paragraph and no space: * ciao</p> <p>Paragraph and 1 space: * ciao</p> <p>Paragraph and 3 spaces: * ciao</p> <p>Paragraph and 4 spaces: * ciao</p> <p>Paragraph before header:</p> <h1>Header</h1> <p>Paragraph before blockquote:</p> <blockquote> <p>Some quote.</p> </blockquote> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/docs-php-markdown/Tight_blocks.text�����������������������������������0100755�0000766�0000024�00000000321�13712061256�0023450�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Paragraph and no space: * ciao Paragraph and 1 space: * ciao Paragraph and 3 spaces: * ciao Paragraph and 4 spaces: * ciao Paragraph before header: #Header Paragraph before blockquote: >Some quote. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/fixtures/mod.rs����������������������������������������������������������������0100644�0000766�0000024�00000006460�13712062542�0015724�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use std::path::Path; use std::fs::File; use std::io::Read; use markdown; use difference; fn compare(name: &str) { let html = format!("tests/fixtures/docs-maruku-unittest/{}.html", name); let text = format!("tests/fixtures/docs-maruku-unittest/{}.text", name); let mut comp = String::new(); File::open(Path::new(&html)).unwrap().read_to_string(&mut comp).unwrap(); let md = Path::new(&text); let mut tokens = String::new(); File::open(md).unwrap().read_to_string(&mut tokens).unwrap(); println!("{:?}", markdown::tokenize(&tokens)); difference::assert_diff(&comp, &markdown::file_to_html(md).unwrap(), " ", 0); } fn roundtrip(name: &str) { let html = format!("tests/fixtures/docs-maruku-unittest/{}.html", name); let text = format!("tests/fixtures/docs-maruku-unittest/{}.text", name); let mut comp = String::new(); File::open(Path::new(&html)).unwrap().read_to_string(&mut comp).unwrap(); let md = Path::new(&text); let mut tokens = String::new(); File::open(md).unwrap().read_to_string(&mut tokens).unwrap(); let v = markdown::tokenize(&tokens); println!("{:?}", v); let out = markdown::generate_markdown(v); println!("BEGIN\n{}\nEND", out); difference::assert_diff(&comp, &markdown::to_html(&out), " ", 0); } #[test] pub fn rt_alt() { roundtrip("alt") } #[test] pub fn rt_blank() { roundtrip("blank") } #[test] pub fn rt_blanks_in_code() { roundtrip("blanks_in_code") } #[test] pub fn rt_code() { roundtrip("code") } #[test] pub fn rt_code2() { roundtrip("code2") } #[test] pub fn rt_code3() { roundtrip("code3") } #[test] pub fn rt_easy() { roundtrip("easy") } #[test] pub fn rt_headers() { roundtrip("headers") } //#[test] //pub fn rt_entities() { //roundtrip("entities") //} #[test] pub fn rt_list1() { roundtrip("list1") } #[test] pub fn rt_list2() { roundtrip("list2") } #[test] pub fn rt_list3() { roundtrip("list3") } #[test] pub fn rt_lists() { roundtrip("lists") } #[test] pub fn rt_lists8() { roundtrip("lists8") } #[test] pub fn rt_one() { roundtrip("one") } #[test] pub fn rt_paragraph() { roundtrip("paragraph") } #[test] pub fn rt_paragraphs() { roundtrip("paragraphs") } #[test] pub fn rt_test() { roundtrip("test") } #[test] pub fn rt_wrapping() { roundtrip("wrapping") } #[test] pub fn alt() { compare("alt") } #[test] pub fn blank() { compare("blank") } #[test] pub fn blanks_in_code() { compare("blanks_in_code") } #[test] pub fn code() { compare("code") } #[test] pub fn code2() { compare("code2") } #[test] pub fn code3() { compare("code3") } #[test] pub fn easy() { compare("easy") } #[test] pub fn headers() { compare("headers") } //#[test] //pub fn entities() { //compare("entities") //} #[test] pub fn list1() { compare("list1") } #[test] pub fn list2() { compare("list2") } #[test] pub fn list3() { compare("list3") } #[test] pub fn lists() { compare("lists") } #[test] pub fn lists8() { compare("lists8") } #[test] pub fn one() { compare("one") } #[test] pub fn paragraph() { compare("paragraph") } #[test] pub fn paragraphs() { compare("paragraphs") } #[test] pub fn test() { compare("test") } #[test] pub fn wrapping() { compare("wrapping") } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������markdown-0.3.0/tests/lib.rs�������������������������������������������������������������������������0100644�0000766�0000024�00000000077�13712061256�0014041�0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extern crate markdown; extern crate difference; mod fixtures; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������