1 ###############################################################################
3 # Package: NaturalDocs::NDMarkup
5 ###############################################################################
7 # A package of support functions for dealing with <NDMarkup>.
9 # Usage and Dependencies:
11 # The package doesn't depend on any Natural Docs packages and is ready to use right away.
13 ###############################################################################
15 # This file is part of Natural Docs, which is Copyright © 2003-2010 Greg Valure
16 # Natural Docs is licensed under version 3 of the GNU Affero General Public License (AGPL)
17 # Refer to License.txt for the complete details
23 package NaturalDocs::NDMarkup;
26 # Function: ConvertAmpChars
28 # Substitutes certain characters with their <NDMarkup> amp chars.
32 # text - The block of text to convert.
36 # The converted text block.
38 sub ConvertAmpChars #(text)
40 my ($self, $text) = @_;
45 $text =~ s/\"/"/g;
52 # Function: RestoreAmpChars
54 # Replaces <NDMarkup> amp chars with their original symbols.
58 # text - The text to restore.
64 sub RestoreAmpChars #(text)
66 my ($self, $text) = @_;
68 $text =~ s/"/\"/g;