Coder Social home page Coder Social logo

github-flavored-markdown's People

Contributors

mojombo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-flavored-markdown's Issues

Parenthesis in links don't work

I want to be able to specify links to documentation-style docs, like so:

GetValue(System.Int32)

The link gets all mangled by the parenthesis between the [ ]. It shows up as "GetValue(System.Int32).md)" with the link covering up to the 32, like Markdown.ApiSite.Api.Sample.GetValue(System.Int32

Would be great to have a way to escape the parenthesis. Maybe ` or double parenthesis?

bla bla bla test

IDNameRank
1Tom Preston-WernerAwesome
2Albert EinsteinNearly as awesome

Markdown dynamic Variables

This to propose implementing a way to insert dynamically some variables in the markdown like repo/fork username.

delete me too

(Sorry, added this issue in wrong place -- please delete it)

CJK support.

I have this wiki page:

https://github.com/bitsmix/dotvim/wiki/Hello

Chinese, Japanese and Korean characters are not show as expected in the code section.

the source code of wiki:

var foo = function(bar) {
    alert('你好'); //"hello" in Chinese.
    alert('こんにちは'); //"hello" in Japanese".
    alert('안녕하세요'); //"hello" in Korean.
};

update:

GFM in issue works fine with CJK Characters.. why don't support wiki page?

Example Source

GitHub Flavored Markdown

View the source of this content.

Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:

Roses are red
Violets are blue

The next paragraph has the same phrases, but now they are separated by two spaces and a newline character:

Roses are red
Violets are blue

Oh, and one thing I cannot stand is the mangling of words with multiple underscores in them like perform_complicated_task or do_this_and_do_that_and_another_thing.

A bit of the GitHub spice

In addition to the changes in the previous section, certain references are auto-linked:

These are dangerous goodies though, and we need to make sure email addresses don't get mangled:

My email addy is [email protected].

Math is hard, let's go shopping

In first grade I learned that 5 > 3 and 2 < 7. Maybe some arrows. 1 -> 2 -> 3. 9 <- 8 <- 7.

Triangles man! a^2 + b^2 = c^2

We all like making lists

The above header should be an H2 tag. Now, for a list of fruits:

  • Red Apples
  • Purple Grapes
  • Green Kiwifruits

Let's get crazy:

  1. This is a list item with two paragraphs. 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.
2. Suspendisse id sem consectetuer libero luctus adipiscing.

What about some code in a list? That's insane, right?

  1. In Ruby you can map like this:

    ['a', 'b'].map { |x| x.uppercase }
    
  2. In Rails, you can do a shortcut:

    ['a', 'b'].map(&:uppercase)
    

Some people seem to like definition lists

Lower cost
The new version of this product costs significantly less than the previous one!
Easier to use
We've changed the product so that it's much easier to use!

I am a robot

Maybe you want to print robot to the console 1000 times. Why not?

def robot_invasion
  puts("robot " * 1000)
end

You see, that was formatted as code because it's been indented by four spaces.

How about we throw some angle braces and ampersands in there?

<div class="footer">
    &copy; 2004 Foo Corporation
</div>

Set in stone

Preformatted blocks are useful for ASCII art:

             ,-. 
    ,     ,-.   ,-. 
   / \   (   )-(   ) 
   \ |  ,.>-(   )-< 
    \|,' (   )-(   ) 
     Y ___`-'   `-' 
     |/__/   `-' 
     | 
     | 
     |    -hrr- 
  ___|_____________ 

Playing the blame game

If you need to blame someone, the best way to do so is by quoting them:

I, at any rate, am convinced that He does not throw dice.

Or perhaps someone a little less eloquent:

I wish you'd have given me this written question ahead of time so I
could plan for it... I'm sure something will pop into my head here in
the midst of this press conference, with all the pressure of trying to
come up with answer, but it hadn't yet...

I don't want to sound like
I have made no mistakes. I'm confident I have. I just haven't - you
just put me under the spot here, and maybe I'm not as quick on my feet
as I should be in coming up with one.

Table for two

IDNameRank
1Tom Preston-WernerAwesome
2Albert EinsteinNearly as awesome

Crazy linking action

I get 10 times more traffic from Google than from
Yahoo or MSN.

YARD::Docstring#summary appends "." on each use

The #summary method prepends a period each time is is used on a non-blank summary. When used more than once on a docstring this causes several trailing periods to appear at the end of the summary.

The solution would be to check the last character and only append if it is not a period. An alternative (and IMHO better) solution would be to perform the appending one time, and memoize the results, so something like:

def summary
  return @summary if defined?(@summary)
  summary = split(/\.|\r?\n\r?\n/).first || ''
  unless summmary.empty? || summary[-1, 1] == '.'
    summary += '.'
  end
  @summary = summary.freeze
end

Disappearing XML

When inserting XML from an XMPP session I seem to lose nested tags.

Example:
http://github.com/pandion/pandion/issues/#issue/1

Three lines in the pre/code block are shown as empty while in fact they contain long XML data. You can verify this by editing the post and looking at the source.

Any idea what is causing this? Or am I simply not using the markdown syntax correctly?

"Preview post/comment" button, please?

I don't get how to use all the tags that github supports. You have very poor documentation of how to use GitHub Flavored Markdown: I don't even know how to paste a link (not as plain text that will be highlighted).
Should I use [url="http://link.here/"]this construction[/url] like on phpbb forums or should I use html syntax and tag "a"?
I wouldn't ask you to write a good documentation, but could you just add "preview post/comment" button, so I could take a look at how my message would look like before I actually send it?

EXIT on error due to invalid DNS setup.

When running $ bash BARRACUDA.sh.txt on VM with Debian lenny, I get EXIT on error due to invalid DNS setup.

I have customized BARRACUDA.sh.txt with these settings:

_MY_OWNIP="10.0.1.14"
_MY_HOSTN="lenny.ecade.me"
_MY_FRONT="aegir.ecade.me"

$ hostname -f returns lenny.ecade.me and $ ping lenny.ecade.me returns 64 bytes from lenny.ecade.me (10.0.1.14): icmp_seq=1 ttl=64 time=0.019 ms.

What can I do?

Code block style is not working

If you indent something by 4 spaces it is not rendering in the code style (grey background, fixed-width font). The official Markdown example show this bug (the "print robot" section and ruby/rails list section).

Here's a test:

This line is indented by 4 spaces. It seems to work fine in the preview!

And another:

This line is indented by a tab.
  1. Apparently it fails after a list.

    This line is indented by 4 spaces.

Insert the code block causes the ordered list of discontinuity

a. Example Normal

  1. The first
    this is contents of.
    Random ro = new Random();
  2. Second
  3. Third

b. Example Abnormal

  1. The first
    this is contents of.
Random ro = new Random();
  1. Second
  2. Third

Source Code

#### a. Example Normal
1. The first    
 this is contents of.    
`Random ro = new Random();`
2. Second
3. Third

#### b. Example Abnormal
1. The first    
 this is contents of.  
\```csharp
Random ro = new Random();
\```
2. Second
3. Third

Suggestion: Reference a file in a commit or branch

something like

gh_pages/sample_content.html auto linking to https://github.com/mojombo/github-flavored-markdown/blob/gh-pages/sample_content.html (Branch/file)

and
d5cda3c/index.md linking to: https://github.com/mojombo/github-flavored-markdown/blob/d5cda3ccf933df092bdc5d069b9700b8d2592731/index.md (SHA/file)

to extend your existing syntax
User@SHA/file and User/Project@SHA/file would be good to work too.

Also User/project@branch would also be a good thing to linkup ( eg: mojombo/github-flavored-markdown@gh-pages )

open link in new page

how can add target="_blank" to markdown links [test](http://test.com) in github?!

Bold/Italics not rendered as such if preceded by opening parenthesis

In the wild, the issue was located here, but I fixed it by adding a space before each problematic word. I wrote several unexpected as unexpected but they were not rendered in bold.

Now some tests have shown me that the parens is the culprit. It's probably by design that those md syntax elements are only interpreted as such when surrounded by whitespaces or punctuation, but I think that it should also work with round brackets:

In (test), (test ), ( test), ( test ), all "test" would be expected to be rendered in bold (at least by me).

The same for (test), (test ), ( test), ( test ), etc.

Thanks,
Alex

Bug with \ characters in code posted in wiki

Tried to post this:

[
"test":"//div[@class=\"test\"]/a[.=\"\u00bb\" or contains(., \"Next\")]"
]

but got something entirely different:

[
"test":"//div[@class=8b928f6fcaf5232b9bafffac1fe856bd247d1c0fquot;test\"]/a[.=8b928f6fcaf5232b9bafffac1fe856bd247d1c0fquot;\u00bb\" or contains(., 8b928f6fcaf5232b9bafffac1fe856bd247d1c0fquot;Next\")]"
]

Ascii Art is truncated in example.

Viewing the markdown instructions I see the ASCII Art is truncated. Using Firefox 26.0 on Ubuntu 13.10 (64 bit).

My guess is that the "less-than" signs confused one piece of software or another. Because that's where it stops rendering.


truncatedasciiartmarkdown

Example code doesn't include the URL/email auto-linking

It would be very useful to see the URL/email auto-linking added to code.rb.

I have been trying to implement it myself, by porting the Showdown modifications back to Ruby, but haven't managed to iron out all the wrinkles.

Please would you add in your Ruby code for this?

Support valgrind reports.

Valgrind reports are lines prefixed with ==pid==.
I'm not really sure why GFM messes this up, I can't see anything about it in the reference, except possibly something to do with header marking.
It'd be good for bug reports if they were supported. Example:

==2350== Use of uninitialised value of size 8
==2350== at 0x602619: HPHP::FileScope::outputCPPForwardDeclarations(HPHP::CodeGenerator&, boost::shared_ptrHPHP::AnalysisResult) (file_scope.cpp:369)
==2350== by 0x603323: HPHP::FileScope::outputCPPForwardDeclHeader(HPHP::CodeGenerator&, boost::shared_ptrHPHP::AnalysisResult) (file_scope.cpp:469)
==2350== by 0x5B9138: HPHP::AnalysisResult::outputAllCPP(HPHP::CodeGenerator::Output, int, std::string const*) (analysis_result.cpp:916)
==2350== by 0x52A667: cppTarget(ProgramOptions const&, boost::shared_ptrHPHP::AnalysisResult, bool) (main.cpp:712)
==2350== by 0x52BC02: runTargetCheck(ProgramOptions const&, boost::shared_ptrHPHP::AnalysisResult) (main.cpp:763)
==2350== by 0x52CE43: process(ProgramOptions const&) (main.cpp:502)
==2350== by 0x52FABF: main (main.cpp:127)
==2350==

Code highlighting please!

Not an issue, but a feature request... We share code all the time in pages, readme's tickets, etc. Having native code highlighting would be very, very useful!

GitHub Flavored Markdown

heading1

heading

heading

  • list1
  • list2
    • list1
    • list2
  • list1
  • list2




This is an example inline link.
This link has no title attribute.

I get 10 times more traffic from Google than from Yahoo or MSN.

// ruby syntax
puts "hello world"

©

This is an H1

This is an H2

BACKQUOTES
BACKQUOTES

BACKQUOTES
BACKQUOTES

This is a header.

  1. This is the first list item.
  2. This is the second list item.

Here's some example code:

return shell_exec("echo $input | $markdown_script");

single asterisks
single underscores
double asterisks
double underscores
un_frigging_believable
this text is surrounded by literal asterisks

Use the printf() function.
There is a literal backtick () here.`

Alt text
http://github.com/
[email protected]

Include other documents

Would it be possible, to include other Markdown files into another 'base' file.

With this you could split up your README.md for example, so users, that only want to see how to install your project, they don't have to scroll down, but only choose the INSTALL.md file, which is also included in README.md.

(I have to admit, that I don't really know, if this is the right place to put gfm suggestions :D)

Markdown could use a better comment syntax

Short version: Markdown could mark block and inline comments using the % character, rather than relying on HTML comments.

For example…

Block comment:

% This is a block comment. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque pretium elementum eros, ac dignissim purus volutpat et. Integer eleifend.

Inline comment:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. %%Here is an inline comment.%% Pellentesque pretium elementum eros, ac dignissim purus volutpat et.


Explanation

Markdown could use a comment syntax that's more in line with the rest of the markup.

Most formatting in Markdown is created with just a single character at the beginning of a line (i.e. #, *, >) or a pair of characters (for *italic*, **bold**, etc.).

But the only way you can comment out text is by using HTML comments, which are comparatively much more difficult: <!-- Here is a comment --> There's a minimum of three characters on each side, at least two of which are different, and the start and end of the paired markers are different.

I use Markdown to collaborate with non-technical users on writing projects, and I've noticed that while these users get the hang of Markdown quickly, they almost always get comments wrong.

We already have CriticMarkup extending commenting, but it arguably suffers from the same problem: the markup is too complex for novice users to master quickly

What I'd propose is a single-character markup for comments that works for block and inline comments. The number one candidate, from my perspective, would be %, which is used to mark comments in LaTeX and also in the Markdown-inspired editor Ulysses.

It's possible that other characters might work better. Another candidate would be //, as used in JavaScript. Having to use /* */ would not be ideal as the beginning and end of the pair differ.

Syntax highlighting

Take a look at my nakajima/markers-mark library for possible syntax highlighting. It’d be awesome.

tables are broken

Tables do no longer work on github. All table related tags except <table> get stripped. See:

Foo Bar
Foo Bar

URLs with an anchor screw up the generated layout

For example,
[Look at this](http://uk2.php.net/manual/en/language.operators.increment.php#77998)

Also [it mucks up linking to lines in files](http://github.com/mojombo/github-flavored-markdown/blob/16c999e8c71134401a78d4d46435517b2271d6ac/sample_content.html#L9)

GitHub Flavored Markdown Examples

GitHub Flavored Markdown

View the source of this content.

Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:

Roses are red
Violets are blue

The next paragraph has the same phrases, but now they are separated by two spaces and a newline character:

Roses are red
Violets are blue

Oh, and one thing I cannot stand is the mangling of words with multiple underscores in them like perform_complicated_task or do_this_and_do_that_and_another_thing.

A bit of the GitHub spice

In addition to the changes in the previous section, certain references are auto-linked:

These are dangerous goodies though, and we need to make sure email addresses don't get mangled:

My email addy is [email protected].

Math is hard, let's go shopping

In first grade I learned that 5 > 3 and 2 < 7. Maybe some arrows. 1 -> 2 -> 3. 9 <- 8 <- 7.

Triangles man! a^2 + b^2 = c^2

We all like making lists

The above header should be an H2 tag. Now, for a list of fruits:

  • Red Apples
  • Purple Grapes
  • Green Kiwifruits

Let's get crazy:

  1. This is a list item with two paragraphs. 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.
2. Suspendisse id sem consectetuer libero luctus adipiscing.

What about some code in a list? That's insane, right?

  1. In Ruby you can map like this:

    ['a', 'b'].map { |x| x.uppercase }
    
  2. In Rails, you can do a shortcut:

    ['a', 'b'].map(&:uppercase)
    

Some people seem to like definition lists

Lower cost
The new version of this product costs significantly less than the previous one!
Easier to use
We've changed the product so that it's much easier to use!

I am a robot

Maybe you want to print robot to the console 1000 times. Why not?

def robot_invasion
  puts("robot " * 1000)
end

You see, that was formatted as code because it's been indented by four spaces.

How about we throw some angle braces and ampersands in there?

<div class="footer">
    &copy; 2004 Foo Corporation
</div>

Set in stone

Preformatted blocks are useful for ASCII art:

             ,-. 
    ,     ,-.   ,-. 
   / \   (   )-(   ) 
   \ |  ,.>-(   )-< 
    \|,' (   )-(   ) 
     Y ___`-'   `-' 
     |/__/   `-' 
     | 
     | 
     |    -hrr- 
  ___|_____________ 

Playing the blame game

If you need to blame someone, the best way to do so is by quoting them:

I, at any rate, am convinced that He does not throw dice.

Or perhaps someone a little less eloquent:

I wish you'd have given me this written question ahead of time so I
could plan for it... I'm sure something will pop into my head here in
the midst of this press conference, with all the pressure of trying to
come up with answer, but it hadn't yet...

I don't want to sound like
I have made no mistakes. I'm confident I have. I just haven't - you
just put me under the spot here, and maybe I'm not as quick on my feet
as I should be in coming up with one.

Table for two

IDNameRank
1Tom Preston-WernerAwesome
2Albert EinsteinNearly as awesome

Crazy linking action

I get 10 times more traffic from Google than from
Yahoo or MSN.

Also, shoop.

Markdown line-break modification a retrograde step

I was really pleased to see Markdown support in GitHub, but I'm really disappointed that such a fundamental change has been made as forcing linebreaks on the end of every line.

One of the aims of Markdown is to allow the text files to be easily readable without further rendering. If you force people to make paragraphs into huge lines then you break this aim for everyone who doesn't work in a auto wordwrap environment.

Stuart.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.