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

grammar scope: Compound link syntax #8

Open
12 tasks
wion opened this issue Feb 9, 2021 · 0 comments
Open
12 tasks

grammar scope: Compound link syntax #8

wion opened this issue Feb 9, 2021 · 0 comments
Labels
to do On the to do list

Comments

@wion
Copy link
Owner

wion commented Feb 9, 2021

Escaping links is a varied game, but rarely necessary if a website's CSS is setup efficiently. Still there are presentational scopes to consider under different formatting situations.

Say, you wanted to link to a book title in a foreign language. In addition to the link syntax, this requires the language attribute for that language, and italic (not emphasis) for the title of work. Textile will allow you to construct that link in three different ways (though only one is logical), none of which currently appear according to the style behaviour set for these items individually.

  1. "__[fr]Les Miserables__":url
  2. __["[fr]Les Miserables":url]__
  3. __[fr]["Les Miserables":url]__

Although all three of those work, the first one is the most logical construct, so it should have priority over getting a working appearance, which is:

  • link syntax greyed out
  • italic syntax, language attribute, and title string italicized
  • language attribute greyed out

This also depends on how an author may have CSS set up in their website. Since every use of a foreign language should be italic (when working in English), then that style can be set automatically for any instance of the lang="" attribute:

*:lang(fr), 
*:lang(la) { font-style: italic; }

By doing that, all three of the compound link options would reduce to one logical construct: "[fr]Les Miserables":url, which is the ideal situation to write in, and thus how to set up an English-language website's CSS for the lang attribute (no matter what element) and links.

When a link is not reflecting a foreign language string, but still needs additional formatting, you have these possibilities (using *strong* as an example):

  1. "*Wow*":url
  2. *["Wow":url]*

The logical one to use in this case is the first one, which also requires fewer characters, so that is the priority construct to scope for, which should appear as:

  • link syntax greyed out
  • strong syntax, including link string appearing bold

You get the idea. Other possible formatting constructs should be considered and scoped for presentation the same way.

One that causes particular difficulty at the moment, and perhaps warrants a different issue, is using em dashes around links.

Check-off Lists

Close issue when all scoping presentations are accounted for in grammar.

Formatting:

  • "__italic text__":url
  • "__()[]italic text__":url
  • "_emphasized text_":url
  • "_()[]emphasized text_":url
  • "**bold text**":url
  • "**()[]bold text**":url
  • "*strong text*":url
  • "()[]**strong text**":url

When em dashes (no surrounding spaces) are used, they require escaping brackets. Needs attention. There are two problems here: 1) escape brackets are not grey-out. 2) the URL consumes ]—closing as part of the URL, using the first encountered blank space as the end of capture, which is not correct.

  • Sentence clause—["offset link clause":url]—closing clause.

The following would be ideal, if possible, for those who use *:lang() { font-style: italic; } in CSS. So the inner []string in each case would be italic:

  • "[]italic text":url
  • %[]span text%
  • etc
@wion wion changed the title grammar scope: Lang attribute grammar scope: Lang attribute (italic element) Feb 9, 2021
@wion wion added the to do On the to do list label Feb 9, 2021
@wion wion closed this as completed Feb 18, 2021
@wion wion removed the to do On the to do list label Feb 18, 2021
@wion wion changed the title grammar scope: Lang attribute (italic element) grammar scope: Escaping compound link syntax Feb 18, 2021
@wion wion added the to do On the to do list label Feb 18, 2021
@wion wion reopened this Feb 18, 2021
@wion wion changed the title grammar scope: Escaping compound link syntax grammar scope: Compound link syntax Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to do On the to do list
Projects
None yet
Development

No branches or pull requests

1 participant