Merge pull request #122 from hqweay/master

highlight supports no-latin Language
This commit is contained in:
Maxime Vaillancourt 2022-06-27 19:46:26 -04:00 committed by GitHub
commit a3e9818e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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