Skip to content

Conversation

@lahmatiy
Copy link
Contributor

Fix and simplify syntaxes, see #663 for details


<pre class="prod">
<dfn><<leader-type>></dfn> = leader( dotted | solid | space | <<string>>);
<dfn><<leader()>></dfn> = leader( <<leader-type>> )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be defined as just <dfn>leader()</dfn>. (The grammar non-terminal automagically works when the function is defined normally.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's confusing a bit, but looks like I was wrong. Fixed.


<pre class="prod">
<dfn><<target>></dfn> = [ ''target-counter()'' | ''target-counters()'' | ''target-text()'' ]
<dfn><<target>></dfn> = <<target-counter()>> | <<target-counters()>> | <<target-text()>>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same deal as previous function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

target is not a function. I missed something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry, was overcorrecting.


<pre class="prod">
<dfn>target-counter()</dfn> = target-counter( [ <<string>> | <<url>> ] , <<custom-ident>> [ , <<counter-style>> ]? )
<dfn><<target-counter()>></dfn> = target-counter( [ <<string>> | <<url>> ] , <<custom-ident>> , <<counter-style>>? )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous function.


<pre class="prod">
<dfn>target-counters()</dfn> = target-counter( [ <<string>> | <<url>> ] , <<custom-ident>> , <<string>> [ , <<counter-style>> ]? )
<dfn><<target-counters()>></dfn> = target-counters( [ <<string>> | <<url>> ] , <<custom-ident>> , <<string>> , <<counter-style>>? )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous function.


<pre class="prod">
<dfn id="target-text-function">target-text()</dfn> = target-text( [ <<string>> | <<url>> ] [ , [ content | before | after | first-letter] ]? )
<dfn id="target-text-function"><<target-text()>></dfn> = target-text( [ <<string>> | <<url>> ] , [ content | before | after | first-letter ]? )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.


<pre class="prod">
<dfn>string()</dfn> = string( <<custom-ident>> , [ first | start | last | first-except ]? )
<dfn><<string()>></dfn> = string( <<custom-ident>> , [ first | start | last | first-except ]? )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same


<pre class="prod">
<dfn>content()</dfn> = content( [text | before | after | first-letter | marker ]? )
<dfn><<content()>></dfn> = content( [ text | before | after | first-letter | marker ] )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same.

Also, don't remove the ?, that's a significant and important bit. (It allows the "If no value is specified" bit a few lines later down.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for clarification, I missed this. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants