Common Mark

broken image


Markdown is a simple way to format text that looks great on any device. It doesn't do anything fancy like change the font size, color, or type — just the essentials, using keyboard symbols you already know. Java library for parsing and rendering Markdown text according to the CommonMark specification (and some extensions). Provides classes for parsing input to an abstract syntax tree of nodes (AST), visiting and manipulating nodes, and rendering to HTML. ROSENTHAL most common mark usually on series issued over many years or on whiteware decorated by others (Selb, Bavaria, Germany) - ca 1890s - 1950s.

St. Aloysius Children's Research Hospital

Ithaca, New York

2:55 A.M.

He stared down at her; his expression was stern and unyielding. He disapproved, as she knew he would.

'Don't look at me like that, Luigi. I'm not crazy.'

They stood alone in the vestibule just inside the front entrance where the warmth and disinfectant held their ground against the invading cold air and horde of germs. She brushed snow from her parka and removed her gloves then reached up and caressed his cold cheek. He was just a boy.

'You're not being fair. Of all people, you should understand. God didn't mean for us to live forever.'

Market

Over the last three months, they had developed a relationship of sorts. She had often come downstairs late at night and talked to him, Catholic to Catholic, about life and about death, and about life after death, all subjects he knew well. She would look into his eyes and wait for answers that never came. His eyes had always seemed able to see into her soul, but tonight they revealed only his sadness, as if he knew what she was about to do.

'It's the only way.'

Common Mark

He did not respond-he never did-so she dropped her eyes like a repentant child from her father's glare. They fell onto the engraving at the base of the stone statue that told of his short life: Luigi Gonzaga had been born in 1568 in Italy, joined the Society of Jesus when he was seventeen, and studied to become a Jesuit; he had contracted the plague while working in a Catholic hospital in Rome. He had cared for the worst victims of the disease, those whom no one else would touch, and he had died at the age of twenty-three. The church awarded him sainthood because he had sacrificed his life to save others: St. Aloysius, the patron saint of children.

'And I'm the Virgin Mary.'

Her eyes ran up the life-size figure of the boy saint for one final glance at his face-one final look into those haunting eyes. He could not understand. She turned away and continued into the hospital and past the reception desk and the elevators. She saw no one, and no one saw her. The hospital on the night shift was a lonely place; she had often paced the vacant corridors during those still hours, unable to sleep but unwilling to leave the child. The last few nights she had timed the exact route she was now taking: seven and a half minutes, in and out.

Bright murals stretched down the corridors, and elaborate mobiles hung from the ceiling. Oversized stuffed cartoon characters sat in play areas waiting for the children. The patients' own colorful paintings adorned the walls like pieces of art in a museum. The nurses wore scrubs that were bright splashes of color. The colors, the art, the sunlit atrium, the healing gardens-the hospital tried desperately to present an upbeat mood, but the scent of death permeated the place. It was inescapable.

But they would escape that night.

Her rubber-soled shoes fell silent as she climbed the stairs to the third floor and turned left. Third Floor West. The research wing. Only a handful of nurses would be on duty during the night shift, and those who were took their meal break at 3:00 A.M. She slowed as she approached the nurses' station and listened for voices; she heard none, so she hurried past. She was about to turn a corner when the sound of footsteps came close; she ducked inside a storage closet. The footsteps passed, and she peeked out and saw the uniformed backside of Kelly Fitzgerald, the charge nurse. Kelly was an Irish girl, too, and at thirty only five years older; they had become fast friends and had often shared late-night coffee and cigarettes on the back stairs.

She did not greet her friend that night.

She stepped out of the closet, shut the door quietly behind her, and continued around the corner and down the corridor. She stopped at Room 312, pushed the door open, and stuck her head inside.

The child was asleep.

She backed out and walked down to Room 320. She entered the room and went over to the bed where a sixteen-year-old boy lay sleeping in the dim light. Jimmy had been paralyzed from the neck down in a street racing accident in California when he had lost control and wrapped his car around a telephone pole. He had undergone experimental spinal cord treatment. He was a guinea pig. Everyone on Three West was a guinea pig.

Jimmy was her friend, too. They had talked often, and she had consoled him when he cried. He knew he would never walk again, never play ball again, never date again, never live a normal life again. One stupid teenage mistake and he was in a wheelchair for life. He said he wanted to die. She leaned over and kissed him on his forehead then unplugged his ventilator.

She exited the room and ran back down the corridor to Room 312. She stepped inside and closed the door just before the entire night-shift staff, led by Nurse Kelly, rounded the corner pulling a crash cart. The alarm had sounded back at the nurses' station. They were racing to save Jimmy, as she knew they would. She wasn't there to kill Jimmy.

Common Markl

Common Mark

She was there to save this child.

She pulled a knit cap over the five-year-old girl's head and stuffed her curly red hair inside. It was cold out. She tucked the St. Aloysius pendant and chain she had bought in the gift shop that first day inside the child's pajamas then wrapped her in the hospital blanket and scooped her up. Her adrenaline was pumping hard; the child weighed nothing in her arms. She went to the door and peeked out. No one was in sight. She walked out of the room and hurried down the corridor past the vacant nurses' station.

She descended the two flights of stairs to the ground floor. Only the reception desk stood between them and the front door. She paused at the corner and again listened; she heard no one. Bert, the grandfather moonlighting as the night-shift security guard, would be grabbing a soda and gabbing with the nurses in the break room. She took a deep breath and darted around the corner, past the desk, and over to St. Aloysius. But she did not stop and look into his eyes this time; she could not bear to see his disappointment. She only said, 'Goodbye, Luigi,' then carried the child out the front doors and through the thick snow to the Jeep 4x4 in the parking lot. She opened the back door and laid her on the seat. The child stirred.

'Mommy?'

She stroked the child's face.

Common markup

'Shhh. Everything's going to be okay now, honey. No more tests.'

The child smiled in her sleep.

She secured her daughter with a seat belt, then climbed into the driver's seat. She started the engine, shifted into gear, and drove off into the dark night.

They were free.

Flavored MarkdownA repository of variant Markdown documentation

(The official specification for CommonMark is at http://jgm.github.io/stmd/spec.html - as it is written inHTML that cannot be pasted into a Markdown-compatible Jekyll page, the content in this page instead describesit in terms of the vfmd specification.)

This page attempts to compare the syntaxes of CommonMark and vfmdfrom the perspective of a Markdown document writer. The background forthis comparison is this HackerNews conversation between JohnMacFarlane, the primary author of the CommonMark spec, and RoopeshChander, the author of the vfmd spec.

Here are links to the syntaxes being compared:CommonMark and vfmd.

Philosophy

While both CommonMark and vfmd attempt to provide an unambiguousspecification for Markdown, their goals and priorities appear tobe somewhat different:

  1. Readability vs. ease-of-parsing

    One of CommonMark's stated goals is to makethe syntax 'easier to parse'.

    For vfmd, ease-of-parsing is not a goal at all andthat does not come in the way of designing the syntax. Readability,and behaving intuitively and consistently are prioritized overease-of-parsing.

  2. Extras

    As of writing this, there doesn't seem to be a documented policy onwhat syntax constructs CommonMark wants to eventually cover in theirspec, what it wants to support as extensions, and how the extensionsshould be integrated.

    CommonMark already includes fenced code blocks, and might possiblyinclude otherconstructs in thefuture. There's also some discussion onCommonMark extensions.

    vfmd specifies only the syntax constructs that were defined in JohnGruber's original Markdown, and includes information on howadditional syntax constructs can be added, while remaining in controlof how the additional constructs impact handling of the the coreconstructs.

    vfmd aims to provide a core-syntax-only-spec thatenable different Markdown flavours to behave consistently forthe core syntax constructs, while allowing them to diverge intheir own specialized syntax constructs.

Similarities

There are some aspects in which both CommonMark and vfmd have pickedsimilar ways to diverge from the original Markdown syntax:

  1. Lists:
    • Both CommonMark and vfmd use a vertical-alignment-based listcontent indentation instead of the 4-space rule
    • In ordered lists, the first number is used as the startingnumber of the list
    • In unordered lists, changing the list bullet character startsa new list
    • Two blank lines can be used to end a list (and all sublists)
  2. HTML blocks:
    • In both CommonMark and vfmd, a HTML div (or similar) block ends atthe next blank line, rather than at the next closing div tag

Major syntax differences

These differences are 'major' in the sense that these can potentiallyrequire significant changes in one spec to make it behave like the otherspec.

Common

Over the last three months, they had developed a relationship of sorts. She had often come downstairs late at night and talked to him, Catholic to Catholic, about life and about death, and about life after death, all subjects he knew well. She would look into his eyes and wait for answers that never came. His eyes had always seemed able to see into her soul, but tonight they revealed only his sadness, as if he knew what she was about to do.

'It's the only way.'

He did not respond-he never did-so she dropped her eyes like a repentant child from her father's glare. They fell onto the engraving at the base of the stone statue that told of his short life: Luigi Gonzaga had been born in 1568 in Italy, joined the Society of Jesus when he was seventeen, and studied to become a Jesuit; he had contracted the plague while working in a Catholic hospital in Rome. He had cared for the worst victims of the disease, those whom no one else would touch, and he had died at the age of twenty-three. The church awarded him sainthood because he had sacrificed his life to save others: St. Aloysius, the patron saint of children.

'And I'm the Virgin Mary.'

Her eyes ran up the life-size figure of the boy saint for one final glance at his face-one final look into those haunting eyes. He could not understand. She turned away and continued into the hospital and past the reception desk and the elevators. She saw no one, and no one saw her. The hospital on the night shift was a lonely place; she had often paced the vacant corridors during those still hours, unable to sleep but unwilling to leave the child. The last few nights she had timed the exact route she was now taking: seven and a half minutes, in and out.

Bright murals stretched down the corridors, and elaborate mobiles hung from the ceiling. Oversized stuffed cartoon characters sat in play areas waiting for the children. The patients' own colorful paintings adorned the walls like pieces of art in a museum. The nurses wore scrubs that were bright splashes of color. The colors, the art, the sunlit atrium, the healing gardens-the hospital tried desperately to present an upbeat mood, but the scent of death permeated the place. It was inescapable.

But they would escape that night.

Her rubber-soled shoes fell silent as she climbed the stairs to the third floor and turned left. Third Floor West. The research wing. Only a handful of nurses would be on duty during the night shift, and those who were took their meal break at 3:00 A.M. She slowed as she approached the nurses' station and listened for voices; she heard none, so she hurried past. She was about to turn a corner when the sound of footsteps came close; she ducked inside a storage closet. The footsteps passed, and she peeked out and saw the uniformed backside of Kelly Fitzgerald, the charge nurse. Kelly was an Irish girl, too, and at thirty only five years older; they had become fast friends and had often shared late-night coffee and cigarettes on the back stairs.

She did not greet her friend that night.

She stepped out of the closet, shut the door quietly behind her, and continued around the corner and down the corridor. She stopped at Room 312, pushed the door open, and stuck her head inside.

The child was asleep.

She backed out and walked down to Room 320. She entered the room and went over to the bed where a sixteen-year-old boy lay sleeping in the dim light. Jimmy had been paralyzed from the neck down in a street racing accident in California when he had lost control and wrapped his car around a telephone pole. He had undergone experimental spinal cord treatment. He was a guinea pig. Everyone on Three West was a guinea pig.

Jimmy was her friend, too. They had talked often, and she had consoled him when he cried. He knew he would never walk again, never play ball again, never date again, never live a normal life again. One stupid teenage mistake and he was in a wheelchair for life. He said he wanted to die. She leaned over and kissed him on his forehead then unplugged his ventilator.

She exited the room and ran back down the corridor to Room 312. She stepped inside and closed the door just before the entire night-shift staff, led by Nurse Kelly, rounded the corner pulling a crash cart. The alarm had sounded back at the nurses' station. They were racing to save Jimmy, as she knew they would. She wasn't there to kill Jimmy.

Common Markl

She was there to save this child.

She pulled a knit cap over the five-year-old girl's head and stuffed her curly red hair inside. It was cold out. She tucked the St. Aloysius pendant and chain she had bought in the gift shop that first day inside the child's pajamas then wrapped her in the hospital blanket and scooped her up. Her adrenaline was pumping hard; the child weighed nothing in her arms. She went to the door and peeked out. No one was in sight. She walked out of the room and hurried down the corridor past the vacant nurses' station.

She descended the two flights of stairs to the ground floor. Only the reception desk stood between them and the front door. She paused at the corner and again listened; she heard no one. Bert, the grandfather moonlighting as the night-shift security guard, would be grabbing a soda and gabbing with the nurses in the break room. She took a deep breath and darted around the corner, past the desk, and over to St. Aloysius. But she did not stop and look into his eyes this time; she could not bear to see his disappointment. She only said, 'Goodbye, Luigi,' then carried the child out the front doors and through the thick snow to the Jeep 4x4 in the parking lot. She opened the back door and laid her on the seat. The child stirred.

'Mommy?'

She stroked the child's face.

'Shhh. Everything's going to be okay now, honey. No more tests.'

The child smiled in her sleep.

She secured her daughter with a seat belt, then climbed into the driver's seat. She started the engine, shifted into gear, and drove off into the dark night.

They were free.

Flavored MarkdownA repository of variant Markdown documentation

(The official specification for CommonMark is at http://jgm.github.io/stmd/spec.html - as it is written inHTML that cannot be pasted into a Markdown-compatible Jekyll page, the content in this page instead describesit in terms of the vfmd specification.)

This page attempts to compare the syntaxes of CommonMark and vfmdfrom the perspective of a Markdown document writer. The background forthis comparison is this HackerNews conversation between JohnMacFarlane, the primary author of the CommonMark spec, and RoopeshChander, the author of the vfmd spec.

Here are links to the syntaxes being compared:CommonMark and vfmd.

Philosophy

While both CommonMark and vfmd attempt to provide an unambiguousspecification for Markdown, their goals and priorities appear tobe somewhat different:

  1. Readability vs. ease-of-parsing

    One of CommonMark's stated goals is to makethe syntax 'easier to parse'.

    For vfmd, ease-of-parsing is not a goal at all andthat does not come in the way of designing the syntax. Readability,and behaving intuitively and consistently are prioritized overease-of-parsing.

  2. Extras

    As of writing this, there doesn't seem to be a documented policy onwhat syntax constructs CommonMark wants to eventually cover in theirspec, what it wants to support as extensions, and how the extensionsshould be integrated.

    CommonMark already includes fenced code blocks, and might possiblyinclude otherconstructs in thefuture. There's also some discussion onCommonMark extensions.

    vfmd specifies only the syntax constructs that were defined in JohnGruber's original Markdown, and includes information on howadditional syntax constructs can be added, while remaining in controlof how the additional constructs impact handling of the the coreconstructs.

    vfmd aims to provide a core-syntax-only-spec thatenable different Markdown flavours to behave consistently forthe core syntax constructs, while allowing them to diverge intheir own specialized syntax constructs.

Similarities

There are some aspects in which both CommonMark and vfmd have pickedsimilar ways to diverge from the original Markdown syntax:

  1. Lists:
    • Both CommonMark and vfmd use a vertical-alignment-based listcontent indentation instead of the 4-space rule
    • In ordered lists, the first number is used as the startingnumber of the list
    • In unordered lists, changing the list bullet character startsa new list
    • Two blank lines can be used to end a list (and all sublists)
  2. HTML blocks:
    • In both CommonMark and vfmd, a HTML div (or similar) block ends atthe next blank line, rather than at the next closing div tag

Major syntax differences

These differences are 'major' in the sense that these can potentiallyrequire significant changes in one spec to make it behave like the otherspec.

Block elements

  1. 'Loose' and 'tight' in lists:

    In CommonMark, 'loose' and 'tight' apply to the wholelist, while in vfmd, they apply to individual listitems.

    For example, consider:

    CommonMark considers the above list to be 'loose', and for HTMLoutput, wraps all list items in

    tags.

    vfmd considers only the list items 'Three' and 'Four' to be'loose', and wraps only those list items in

    tags.

  2. Start of HTML blocks:

    CommonMark requires that HTML-block-starting tags (like divtags) be placed at the start of a line; vfmd handles HTML blocktags anywhere in a line, and includes any previous text as partof the block.

    For example, consider:

    CommonMark treats the first chunk as a normal paragraph, and theHTML output from CommonMark is not valid HTML:

    vfmd recognises the

    even if it's not at the start of the line,and the HTML output from vfmd looks like:

  3. HTML blocks that can have blank lines:

    vfmd allows pre / script / style elements to contain blanklines, but only if well-formed (i.e. iff matchingopening-closing tags are found). CommonMark does not treat theseelements specially, and recommends using in place of a blank line within pre elements.

    For example, for the input: How to clear memory on windows.

    CommonMark outputs the HTML:

    while vfmd outputs:

    See also: http://talk.commonmark.org/t/139/.

Span elements

  1. Emphasis:

    • Intra-word emphasis:

      CommonMark allows using ‘*' for intra-word emphasis, but disallowsusing ‘_', while vfmd disallows any intra-word emphasis.

    • Nested emphasis of the same kind:

      CommonMark is somewhat inconsistent in the treatment of em-within-emand strong-within-strong emphasis:

      • *foo *bar** is is em-within-em
      • **foo* bar* is normal text without any emphasis

      vfmd treats both the above as em-within-em.

      The same difference can be seen for the strong-within-strong scenariosince CommonMark treats any sequence of four or more *s or _sas normal text. vfmd treats * and _ sequences as potential emphasisindicators irrespective of how long they are.

  2. Span-level HTML:

    When handling span-level HTML, CommonMark recognizes HTML tags butnot HTML elements, resulting in some invalid HTML being output.

    For example:

    • *foo bar* baz* outputs foo bar baz*
    • *

      foo

      *
      outputs

      foo

    vfmd recognizes span-level HTML elements and is aware of HTMLnesting rules. In the above cases, vfmd chooses to ignore someMarkdown styling over outputting invalid HTML.

    • *foo bar* baz* outputs foo bar* baz
    • *

      foo

      *
      outputs *

      foo

      *
      itself

Minor syntax differences

These differences are 'minor' in the sense that, in my assessment, each ofthese by itself doesn't require a significant change in one spec to make itbehave like the other spec.

Please note that this is not an exhaustive list.

Block elements

  • In CommonMark, ATX headers require a space between the '#' and the text, whilein vfmd, the space is optional.
  • In CommonMark, one blank line ends a blockquote, two consecutive blank linesend a list, but code blocks don't end on any number of blank lines.In vfmd, two consecutive blank lines end a list / blockquote / code block.
  • In vfmd list syntax, changing the number of spaces before/after the listmarker starts a new list; In CommonMark, the same list continues.
  • In CommonMark, there's a special-cased rule for allowing thefirst block of a list item to be a code block; In vfmd, there's no specialrule - this just can't be written using pure vfmd.
  • CommonMark doesn't require a blank line to seprate a top-levelblockquote from the previous paragraph; vfmd does.
  • CommonMark doesn't require a blank line to seprate a top-levellist from the previous paragraph; vfmd does.
  • In CommonMark, there's a new '1)' syntax for an ordered list, whichis absent in vfmd
  • CommonMark recognizes HTML declarations, processing instructionsand CDATA, while vfmd doesn't - vfmd treats them as text
  • The list of HTML tags that can start a HTML block are differentbetween CommonMark and vfmd
  • In vfmd, HTML comments can contain blank lines, while in CommonMark,such a blank line would end the block

Span elements

  • CommonMark allows a link to contain another link label; vfmd doesn't.
  • CommonMark doesn't allow the link URL to be broken across multiplelines at all; vfmd allows it if the URL is enclosed in .
  • CommonMark allows both inline and reference link titles to bespecified within parentheses instead of quotes; In vfmd, onlyreference link titles can be specified within parentheses.
  • CommonMark processes the alt text of images as Markdown (not sure ifthis is a bug in the spec or intentional), so![*foo*](url) becomes ; In vfmd, the alt text ispreserved as is, so the output is .
  • CommonMark collapses interior whitespace in code spans into a singlespace; vfmd doesn't.
  • vfmd detects and auto-links URLs of the form scheme://path withouthaving to enclose them in ; CommonMark doesn't.
  • While looking for URLs to be auto-linked, CommonMark has a whitelist ofschemes that are detected as automatic links; vfmd just looks for anytext matching a generic scheme://path pattern.
  • While looking for email addresses to be auto-linked, CommonMarkrecognizes only ASCII email addresses; vfmd also recognizesinternational email addresses.
  • In CommonMark, backslashes in URLs are escaping backslashes,except autolinked URLs; In vfmd, backslashes in all URLs (whetherautolinked or otherwise) are literal non-escaping backslashes.
  • CommonMark treats a backslash-newline as a substitute forspace-space-newline (i.e. as a hard line break); vfmd doesn't.

Encoding

vfmd enforces UTF-8 encoding while CommonMark leaves it unspecified.

However, certain aspects of the CommonMark spec (like link reference lookups)seem to require a Unicode-based encoding and knowing what the encoding is.So in practice, CommonMark implementations might have to enforce aUnicode-based encoding, or auto-detect the encoding, or obtain theencoding as an input.

Common Market Crossword

You can contribute to this documentation on GitHub.





broken image