Homec4science

Unescape sequences in .cow files which look like escaped sequences

Authored by Christopher Speck <die.drachen@gmail.com> on Sep 26 2015, 06:10.

Description

Unescape sequences in .cow files which look like escaped sequences

Summary:
Cowsay's .cow files are perl scripts which contain escaped character sequences. This results in an excess of backslashes in the rendered cow. This change replaces occurrences of \x with just x.

This change also introduces conditional unescaping based on whether the cowfile is an original perl-script cowfile or a plain ascii-art file.

Refs T9471

Test Plan:
Use cowsay in a comment and verify that the rendered cow displays appropriately.
Use cowsay with the "dragon" cow and verify that the rendered dragon displays appropriately (contains \@ sequence).

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T9471

Differential Revision: https://secure.phabricator.com/D14170

Details

Committed
epriestley <git@epriestley.com>Sep 26 2015, 06:10
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUc72eb747e706: Fix an issue with PhutilConsoleTable alignment
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUdad3ab8d7e87: Unescape sequences in .cow files which look like escaped sequences (authored by Christopher Speck <die.drachen@gmail.com>).Sep 26 2015, 06:10