mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Revert "Refactor highlight tag to behave like the raw tag" (#7592)
* Revert "Refactor `highlight` tag to behave like the `raw` tag (#6821)"
This reverts commit 36404b9a43.
* use Liquid `raw` in upgrading document
* let the minor improvements stay
* Revert entry in History.markdown
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
module Jekyll
|
||||
module Tags
|
||||
class HighlightBlock < Liquid::Raw
|
||||
class HighlightBlock < Liquid::Block
|
||||
include Liquid::StandardFilters
|
||||
|
||||
# The regular expression syntax checker. Start with the language specifier.
|
||||
@@ -33,7 +33,7 @@ module Jekyll
|
||||
def render(context)
|
||||
prefix = context["highlighter_prefix"] || ""
|
||||
suffix = context["highlighter_suffix"] || ""
|
||||
code = @body.gsub(LEADING_OR_TRAILING_LINE_TERMINATORS, "")
|
||||
code = super.to_s.gsub(LEADING_OR_TRAILING_LINE_TERMINATORS, "")
|
||||
|
||||
output =
|
||||
case context.registers[:site].highlighter
|
||||
@@ -103,8 +103,6 @@ module Jekyll
|
||||
"<figure class=\"highlight\"><pre><code #{code_attributes}>"\
|
||||
"#{code.chomp}</code></pre></figure>"
|
||||
end
|
||||
|
||||
def ensure_valid_markup(tag_name, markup, parse_context); end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user