highlight supports no-latin Language

This commit is contained in:
hqweay 2022-06-27 21:28:49 +08:00
parent 8518ad014b
commit 063b727723
2 changed files with 3 additions and 1 deletions

View File

@ -82,6 +82,8 @@ And of course, images look great:
You can also ==highlight some content== by wrapping it with `==`.
Non-latin languages are supported too: ==你好==, ==안녕하세요==, ==こんにちは==.
### Code syntax highlighting
You can add code blocks with full syntax color highlighting by wrapping code snippet in triple backticks and specifying the type of the code (`js`, `rb`, `sh`, etc.):

View File

@ -14,5 +14,5 @@ Jekyll::Hooks.register [:pages], :post_convert do |doc|
end
def replace(doc)
doc.content.gsub!(/==+(\w(.*?)?[^ .=]?)==+/, "<mark>\\1</mark>")
doc.content.gsub!(/==+([^ ](.*?)?[^ .=]?)==+/, "<mark>\\1</mark>")
end