This is an example markdown you can use to test porting a markdown to Canvas.
Since this markdown is not the default README.md
, to convert this markdown,
you should use a command like:
github-to-canvas -c <course_id> --file EXAMPLE.md
If Canvas lesson creation is successful, the gem will output a link you can use to go directly to the new lesson.
const variable = "string" + 23;
// comment
function hello(world) {
if (true) {
console.log(world);
}
return null;
}
import React from "react";
function App({ props }) {
return (
<div>
{/* comment */}
<Header name={props.name} />
</div>
);
}
<body>
<!-- comment -->
<div id="container">
<h1>Hello</h1>
<h2>World</h2>
</div>
</body>
# Comment
class Dog < ActiveRecord::Base
attr_reader :name
def initialize(name)
@name = name
end
def woof
puts "Woof my name is #{self.name}"
end
end
dog = Dog.new("Fezzik")
dog.woof
/* Fixes size issue for inline code in headings */
#content .user_content h1 code,
#content .user_content h2 code,
#content .user_content h3 code,
#content .user_content h4 code,
#content .user_content h5 code,
#content .user_content h6 code {
font-size: 0.8em;
padding: 0.2em 0.4em;
color: inherit;
}
-- comment
SELECT
title AS name,
genre,
price
FROM games
INNER JOIN reviews ON games.id = reviews.game_id
WHERE reviews.score > 4;
def bubble_sort(items):
""" Implementation of bubble sort """
for i in range(len(items)):
for j in range(len(items)-1-i):
if items[j] > items[j+1]:
# Swap!
items[j], items[j+1] = items[j+1], items[j]
bundle exec rails db:migrate db:seed
bundle exec rails server
const variable = "string" + 23;
// comment
function hello(world) {
if (true) {
console.log(world);
}
return null;
}
Four spaces also produces a code block
(fence code blocks are preferred tho)
Syntax | Description |
---|---|
Header | Title |
Paragraph | Text |
Table with alignment (left, center, right):
Syntax | Description | Test Text |
---|---|---|
Header | Title | Here's this |
Paragraph | Text | And more |
Here are some inline
<code>
<h1>blocks</h1>
Here are some image examples:
Here is some bold text and some emphasized text.
Here is some text with underscores in_side_the text that shouldn't be emphasized.
For example, this snake case variable should have underscores: snake_case_variable
A single paragraph quote:
Dorothy followed her through many of the beautiful rooms in her castle.
A multi-paragraph quote:
Dorothy followed her through many of the beautiful rooms in her castle.
The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
A nested quote:
Dorothy followed her through many of the beautiful rooms in her castle.
The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
A quote with other elements:
Revenue was off the chart.
Profits were higher than ever.
Everything is going according to plan.
- First item
- Second item
- Third item
- Indented item
- Indented item
- Fourth item
- First item
- Second item
- Third item
- Indented item
- Indented item
- Fourth item
-
This is the first list item.
-
Here's the second list item.
I need to add another paragraph below the second list item.
-
And here's the third list item.
-
This is the first list item.
-
Here's the second list item.
I need to add another paragraph below the second list item.
const code = "mixed in with the list";
-
And here's the third list item.
A typical markdown link: example
A reference style link: example
A link with a title: titled link