[go: nahoru, domu]

Skip to content

Commit

Permalink
add heading ids once more. comment obsolete features.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Dec 4, 2013
1 parent e3692c7 commit 98d413f
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,13 +742,13 @@ function Renderer() {}
Renderer.prototype.code = function(code, lang, escaped, options) {
options = options || {};

if (options.highlight) {
var out = options.highlight(code, lang);
if (out != null && out !== code) {
escaped = true;
code = out;
}
}
// if (options.highlight) {
// var out = options.highlight(code, lang);
// if (out != null && out !== code) {
// escaped = true;
// code = out;
// }
// }

if (!lang) {
return '<pre><code>'
Expand All @@ -773,7 +773,16 @@ Renderer.prototype.html = function(html) {
};

Renderer.prototype.heading = function(text, level) {
return '<h' + level + '>' + text + '</h' + level + '>\n';
return '<h'
+ level
// + ' id="'
// + options.headerPrefix
// + raw.toLowerCase().replace(/[^\w]+/g, '-')
+ '>'
+ text
+ '</h'
+ level
+ '>\n';
};

Renderer.prototype.hr = function() {
Expand Down

0 comments on commit 98d413f

Please sign in to comment.