Fix parsing of dns zone record line succeeding record with comment by johnbergvall · Pull Request #2595 · pygments/pygments

Conversation

@johnbergvall

A tweak of #2464

Previously, the second line was treated as a series of Literals following 192.0.2.4, instead of a separate record line

delta           A      192.0.2.4 ; comment
delta2           A      192.0.2.5

birkenfeld

'multiple-simple-values': [
include('simple-value'),
(r'[\n]+', Whitespace),
(r'[ \t]+', Whitespace),

Choose a reason for hiding this comment

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

Aren't these two just \s+?

Also, simple-value already includes a rule for [ \t]+.

Choose a reason for hiding this comment

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

Yes, you are correct. The last line should not have been included in the final revision. Sorry!

An updated version is available.

Choose a reason for hiding this comment

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

@birkenfeld is there anything else I can do to help getting this merged?

Previously, the second line was treated as continuing Literals following
192.0.2.4

delta           A      192.0.2.4 ; comment
delta2           A      192.0.2.5

@birkenfeld

Sorry, dropped the ball. LGTM!

Labels

A-lexing

area: changes to individual lexers