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

> Sylvain wrote:
> Does that mean, as of v1.0, we should *only* consider the original
> punctuation marks (,, ;, ", ., ?, or !) as a valid context for a closing
> constrained markup?

Ah. I now have a clearer understanding of what you're referring to. I think we're really going to need to give this one some thought because it has implications either way.

The original intent of constrained markup in AsciiDoc at a high level (as I understand it) is that it encloses a phrase that begins and ends with a word character and is bounded by spaces. But, of course, prose is more complicated than that because words and phrases aren't always bounded by spaces. Instead, they can be directly adjacent to punctuation, so AsciiDoc tries to accommodate that (using the list you cited). But now, the definition of constrained gets a lot more fuzzy because we (necessarily) allow those exceptions. Where do we draw the line?

One way to answer this question is to implement it the way it is implemented in Asciidoctor (and thus what authors are used to) for 1.0. But I recognize that this decision favors languages for which the current set of exceptions apply. Another approach is to say that instead of being bounded by spaces, the constrained markup can be bounded by any non-word characters. That could potentially break some documents that are relying on the current exception list, but perhaps it's extremely rare.

I think the flaw in the definition of constrained is to look at the bounded characters as spaces + exceptions instead of looking for non-word characters. What we're really trying to avoid is matching markup that's bounded by word characters (especially true for the underscore character). That's when unconstrained is required because we need to check with the author to confirm that's really the intent. (We could say the author doubles down on the formatting).

So it's an open question that is going to require a spec issue (as soon as we get that process ironed out).

Best Regards,


Dan Allen, Vice President | OpenDevise Inc.
Pronouns: he, him, his
Content ∙ Strategy ∙ Community

Back to the top