Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub style code blocks #69

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

FransBouma
Copy link

I added github style codeblock support, using a new GitHubCodeBlocks flag on the MarkdownDeep class. It allows specification of language after the first fence marker of a code block. This is then emitted into the HTML using Highlight.js style classes, so

```cs
var i = 42;
```

will result in

<pre><code class="cs">var i = 42;
</code></pre>

I also merged a PR that's been dangling on your PR list for over a year, as it fixed a couple of problems. Not sure if this Repo is still alive or not.

There's flexibility in the language specification: you can have space between the fence marker and the language and also trailing spaces / tabs till the EOL.

I also removed the Backup folder as it was of no use
I also updated the gitignore file to fit vs.net usage
I also removed the postbuild event on the js project as it fails. It's also not really nice to run a .bat in a post-build on an OSS project, as it will take people off-guard: it might ruin their PC as it runs likely at Administrator level.

Hope helpful.

ashkulz and others added 5 commits May 7, 2015 17:53
The logic that was used was different from the JS version; the JS
version was more correct as just specifying UrlRootLocation would
give proper results but would fail in the server-side version. In
addition, a bug was fixed where the return value of QualifyUrl was
being ignored.
Clean up: removed backup
Moved everything to .NET 4.5
Added GitHub style ``` codeblocks, using the 'GitHubMode' option. Any
identifier specified is used as language specification in the code block
in the html
Added test for GitHub mode
Removed js project's post build event as it failed anyway.
various fixes in server-side Markdown.OnQualifyUrl
@FransBouma FransBouma closed this Feb 16, 2016
@FransBouma
Copy link
Author

Reopened, with bugfix in codeblocks for nohighlight

@FransBouma FransBouma reopened this Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants