Allow Unicode slugs
This commit is contained in:
parent
51f6355986
commit
aaa6256e09
4 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "2",
|
"slug": "2-юникод",
|
||||||
"title": "Chapter 2",
|
"title": "Chapter 2",
|
||||||
"chapters": [
|
"chapters": [
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ The Rty
|
||||||
Chapter 1 paragraph text
|
Chapter 1 paragraph text
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<h2 id="chapter-2">Chapter 2</h2>
|
<h2 id="chapter-2-юникод">Chapter 2</h2>
|
||||||
<p>
|
<p>
|
||||||
<span>
|
<span>
|
||||||
Chapter 2 paragraph text
|
Chapter 2 paragraph text
|
||||||
|
|
|
@ -41,7 +41,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
article.chapter '2', 'Chapter 2' do |chapter|
|
article.chapter '2-юникод', 'Chapter 2' do |chapter|
|
||||||
chapter.paragraph do |paragraph|
|
chapter.paragraph do |paragraph|
|
||||||
paragraph.text 'Chapter 2 paragraph text'
|
paragraph.text 'Chapter 2 paragraph text'
|
||||||
end
|
end
|
||||||
|
|
|
@ -66,7 +66,7 @@ require_relative 'repubmark/elems/footnote'
|
||||||
module Repubmark
|
module Repubmark
|
||||||
FORMATS = %i[chapters gemtext html summary_plain word_count].freeze
|
FORMATS = %i[chapters gemtext html summary_plain word_count].freeze
|
||||||
|
|
||||||
SLUG_RE = /\A\w+(-\w+)*\z/
|
SLUG_RE = /\A[[:word:]]+(-[[:word:]]+)*\z/
|
||||||
|
|
||||||
UNICODE_SUPS = {
|
UNICODE_SUPS = {
|
||||||
'0' => '⁰',
|
'0' => '⁰',
|
||||||
|
|
Loading…
Reference in a new issue