Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [asciidoc-lang-dev] Text Markup, syntax and parsing thereof

On Tue, 9 Mar 2021 at 10:31, Dan Allen <dan@xxxxxxxxxxxxxx> wrote:
> I looked at the sources this morning and failed to realize the
> documentation was an simplified explanation of the actual implementation.

That's where my reply should have started. It's been awhile since I've studied those regular expressions and I messed up by not consulting them before I tried to explain the matching rules in my reply. But regardless of how I explain it, it's the pattern that we ultimately have to reconcile with. I agree that the spec is a good opportunity to clarify what the rules are, and perhaps even simplify them if feasible.

I might be overstating the incompatibility of a recursive specification for quotes with current practice, I don't speak Asciidoctor code or even Ruby so could an Asciidoctor/Rubyist please provide the following from the code:

2. any options when they are applied (if Ruby is like other languages there are options that can be specified when the regex is applied, eg if dot matches newline)

3. the order the markups in Table 1 are substituted
I suspect that the differences will only apply for technically illegal situations such as overlapping quotes but want to check.  

If that is the case then I suggest it is acceptable to introduce incompatibility with illegal markup usages since they should not exist.

> If I understand it well, constrained formatting marks are allowed at
> "word boundaries" where a "word boundary" is a defined as the transition
> from a non-word to a non-space character (or the other way around for
> closing markups).

That's generally the idea, but still not an exact explanation. That's because it's possible to use constrained formatting around a sequence of characters that are not words at all. For example:


Another way to explain it is that there has to be a space or start of line on the left and a non-space on the right of the first formatting mark (and the opposite for its pair). But that rule may prove too loose to specify and thus may need to be challenged. I don't know enough about the implications to take a position on that yet.

I also suspect it will be too loose, (and too tight for the closing if its followed by a full stop, question etc as currently allowed) but like you havn't analysed it fully.  


Best Regards,


Dan Allen, Vice President | OpenDevise Inc.
Pronouns: he, him, his
Content ∙ Strategy ∙ Community
asciidoc-lang-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top