Skip to content

Italics are not correctly highlighted when the terminating asterisk is followed by a some characters. #304

Open
@cjns1989

Description

@cjns1989

In French typography it is customary to separate some punctuation characters (such as '!', '?', ':', ';', '%', '»' etc.) from the last letter of the preceding word by a non breakable thin space ­— i.e. 0x202f.

As it appears this causes the pandoc.vim syntax file to fail to detect the end of an italicised sequence correctly when the terminating asterisk is followed by a thin space and continue highlighting until it runs into another asterisk… or the end of the file.

*First italicised sequence ends here* ! … blah… blah… some text follows … *2nd it. seq. ends*

In the above sample the asterisk that follows the word 'here' is itself followed by an 0x202f and then by an exclamation mark (!). Instead of stopping on the last letter of the word 'here', the highlighting continues until the last letter of the word 'ends' that terminates the 2nd italicised sequence because this particular asterisk happens to be followed by a regular space.

Note, that this also happens when the thin space is replaced by a full width non-breakable space (0x160). I didn't other variations.

Workaround in most cases is to move the terminating asterisk after the punctuation sign.

Thanks,

CJ

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions