mojombo / github-flavored-markdown Goto Github PK
View Code? Open in Web Editor NEWGitHub's Flavor of Markdown
GitHub's Flavor of Markdown
bootstrap-builder-boilerplate-+++is+++is+++is,,,---te---te---te,,,
I want to help from you contact or commits us
thank
I want to be able to specify links to documentation-style docs, like so:
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?
ID | Name | Rank |
---|---|---|
1 | Tom Preston-Werner | Awesome |
2 | Albert Einstein | Nearly as awesome |
This to propose implementing a way to insert dynamically some variables in the markdown like repo/fork username.
(Sorry, added this issue in wrong place -- please delete it)
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?
For example, this list renders perfectly:
But this list does not:
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.
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].
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
The above header should be an H2 tag. Now, for a list of fruits:
Let's get crazy:
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?
In Ruby you can map like this:
['a', 'b'].map { |x| x.uppercase }
In Rails, you can do a shortcut:
['a', 'b'].map(&:uppercase)
Some people seem to like definition lists
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">
© 2004 Foo Corporation
</div>
Preformatted blocks are useful for ASCII art:
,-. , ,-. ,-. / \ ( )-( ) \ | ,.>-( )-< \|,' ( )-( ) Y ___`-' `-' |/__/ `-' | | | -hrr- ___|_____________
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.
ID | Name | Rank |
---|---|---|
1 | Tom Preston-Werner | Awesome |
2 | Albert Einstein | Nearly as awesome |
I get 10 times more traffic from Google than from
Yahoo or MSN.
If you just have the text www.
, it is autolinked to http://www.
See https://github.com/dryan/s3domain/blob/master/README.md for an example.
Autodesk
I replied to an issue via email and numbered lines in the block quote are incorrectly being interpreted as issue links. Block quote text should probably not be parsed for GFM annotations.
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
"--></style></script><script>alert('XSS')</script>
test
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?
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?
Hello,
I just made a changelog with all issue numbers and commit numbers:
https://github.com/sourcerer-mike/php-application-toolkit/blob/develop/CHANGELOG.md
The commits and issues are not linked.
Can you explain why? They are linked in the example "index.md" as shown in #1
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?
I'd like to report a small issue with the markdown engine:
under_score
is rendered improperly without code span (Firefox 25.0/Ubuntu),
under_score
works,
under_score
fails as well
Examples for implementations where it works:
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.
Apparently it fails after a list.
This line is indented by 4 spaces.
Random ro = new Random();
Random ro = new Random();
#### 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
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 )
how can add target="_blank" to markdown links [test](http://test.com)
in github?!
hey, check [this].
[this]: https://github.com/cebe/markdown
There is a reference on the last line of the code block above.
Like this but without the space after ]
:
hey, check [this].
[this] : https://github.com/cebe/markdown
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
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\")]"
]
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?
The GFM doesn't get parsed correctly at the example page. (Linked from the GFM help). Take a look at the comments section where some folks decided to render the markdown themselves.
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==
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!
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"
©
BACKQUOTES
BACKQUOTESBACKQUOTES
BACKQUOTESThis is a header.
- This is the first list item.
- 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.`
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)
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.
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.
Take a look at my nakajima/markers-mark library for possible syntax highlighting. It’d be awesome.
I have repositories whose name contains dashes and GFM is broken on them, i.e. (for instance) doudou/pocosim-log#1 is not properly linking to the corresponding issue.
Tables do no longer work on github. All table related tags except <table> get stripped. See:
Foo | Bar |
Foo | Bar |
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)
Website.com
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.
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].
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
The above header should be an H2 tag. Now, for a list of fruits:
Let's get crazy:
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?
In Ruby you can map like this:
['a', 'b'].map { |x| x.uppercase }
In Rails, you can do a shortcut:
['a', 'b'].map(&:uppercase)
Some people seem to like definition lists
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">
© 2004 Foo Corporation
</div>
Preformatted blocks are useful for ASCII art:
,-. , ,-. ,-. / \ ( )-( ) \ | ,.>-( )-< \|,' ( )-( ) Y ___`-' `-' |/__/ `-' | | | -hrr- ___|_____________
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.
ID | Name | Rank |
---|---|---|
1 | Tom Preston-Werner | Awesome |
2 | Albert Einstein | Nearly as awesome |
I get 10 times more traffic from Google than from
Yahoo or MSN.
Also, shoop.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.