From aaa6256e09fe0ee2f71af55ab03c2ef575626682 Mon Sep 17 00:00:00 2001
From: Alex Kotov
Chapter 2 paragraph text diff --git a/examples/full.repub b/examples/full.repub index c4f91d4..dc27595 100644 --- a/examples/full.repub +++ b/examples/full.repub @@ -41,7 +41,7 @@ end -article.chapter '2', 'Chapter 2' do |chapter| +article.chapter '2-юникод', 'Chapter 2' do |chapter| chapter.paragraph do |paragraph| paragraph.text 'Chapter 2 paragraph text' end diff --git a/lib/repubmark.rb b/lib/repubmark.rb index 8f79d5b..0a5f568 100644 --- a/lib/repubmark.rb +++ b/lib/repubmark.rb @@ -66,7 +66,7 @@ require_relative 'repubmark/elems/footnote' module Repubmark FORMATS = %i[chapters gemtext html summary_plain word_count].freeze - SLUG_RE = /\A\w+(-\w+)*\z/ + SLUG_RE = /\A[[:word:]]+(-[[:word:]]+)*\z/ UNICODE_SUPS = { '0' => '⁰',