Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix regexes in #quote-paragraph rule, and downstream #768

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix regexes in #quote-paragraph rule, and downstream
As it stands, the regex in #quote-paragraph will not match any block-attribute-list that contains, itself, an inline macro -- such as a URL macro or a bibliographic-citation macro. Downstream from that rule, there are weaknesses also in the #block-attribute-inner rule. The fixes I've applied here are based on earlier discussion of this whole matter at asciidoctor/atom-language-asciidoc#197 -- where there are screen-shots and syntax-examples (too bad I was barking up the wrong tree ... Atom instead of VS Code!!).
andrewcarver committed Jul 25, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 2855f2230b2fcee45753f96959c0543cc63e0619
6 changes: 3 additions & 3 deletions syntaxes/Asciidoctor.json
Original file line number Diff line number Diff line change
@@ -337,7 +337,7 @@
{
"comment": "attributes",
"name": "markup.meta.attribute-list.asciidoc",
"match": "(?<=\\{|,|.|#|\"|'|%)([^\\],.#%]+)",
"match": "(?<=\\{|,|\\.|#|\"|'|%)(?:[^\\],.#%]|\\](?=[ \\t]*\\S))+",
"captures": {
"0": {
"patterns": [
@@ -1710,10 +1710,10 @@
"patterns": [
{
"name": "markup.italic.quotes.asciidoc",
"begin": "(?=(?>(?:^\\[(quote|verse)((?:,|#|\\.|%)([^,\\]]+))*\\]$)))",
"begin": "(?=(?>(?:^\\[(quote|verse)(?:(?:,|#|\\.|%)(?:[^,\\]]|\\](?=[ \\t]*\\S))+)*\\]$)))",
"patterns": [
{
"match": "^\\[(quote|verse)((?:,|#|\\.|%)([^,\\]]+))*\\]$",
"match": "^\\[(quote|verse)(?:(?:,|#|\\.|%)(?:[^,\\]]|\\](?=[ \\t]*\\S))+)*\\]$",
"captures": {
"0": {
"patterns": [