public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Joey Dumont <joey.dumont-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Pandoc + TWiki (writer) output
Date: Tue, 11 Dec 2018 10:55:12 -0800 (PST)	[thread overview]
Message-ID: <8631e4f1-8744-40b4-a3ce-a8d8e1bb0202@googlegroups.com> (raw)
In-Reply-To: <yh480kbm5rj3vq.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 4901 bytes --]

I tried that already. My escape function is probably bad then. 

-- Character escaping
local function escape(s, in_attribute)
  return s:gsub("[<>&\"']",
    function(x)
      if x == '<' then
        return '&lt;'
      elseif x == '>' then
        return '&gt;'
      elseif x == '&' then
        return '&amp;'
      elseif x == '"' then
        return ''
      elseif x == "'" then
        return "'"
      else
        return x
      end
    end)
end

Should I put something more specific in the x == "'" and x == '"' fields?

On Tuesday, December 11, 2018 at 1:49:13 PM UTC-5, John MacFarlane wrote:
>
>
> You can always change the 'escape' function in your 
> custom writer so it outputs ASCII entities instead of 
> UTF-8 characters. 
>
> Joey Dumont <joey....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes: 
>
> > Oh. 
> > 
> > It might be my TWiki installation then. Nothing I can really do about 
> that 
> > though. 
> > 
> > Thanks for the help! 
> > 
> > On Monday, December 10, 2018 at 2:49:58 PM UTC-5, John MacFarlane wrote: 
> >> 
> >> 
> >> This is an encoding issue. It looks like twiki is 
> >> generating the right UTF-8 encoded output, but your 
> >> browser isn't displaying it as UTF-8.  You should 
> >> be able to fix this by ensuring that twiki produces 
> >> HTML containing a meta tag that sets the charset to 
> >> UTF-8. 
> >> 
> >> Joey Dumont <joey....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes: 
> >> 
> >> > I'm having trouble with quotes and what I believe are thin spaces, 
> >> however. 
> >> > 
> >> > For instance, writing "he'll test something" in Markdown, then 
> >> converting 
> >> > to TWiki yields an HTML curly quote instead of a plain ' quote. TWiki 
> >> then 
> >> > freaks and renders that as "he’ll test something"*.* 
> >> > 
> >> > The string "Dec. 5th" seems to yield a thin space between the period 
> and 
> >> > the decimal, but TWiki renders it as "Dec. 5th" 
> >> > 
> >> > Not sure how to fix this. Tried escaping with escape(s) in multiple 
> >> places, 
> >> > such as Str, Plain and Para, but that didn't work. Tried modifying 
> >> > SingleQuoted to return "\'" .. s .. "\'", but that also didn't work. 
> Not 
> >> > sure what to do about the thin space either. 
> >> > 
> >> > On Saturday, February 25, 2017 at 3:29:07 PM UTC-5, ss infod wrote: 
> >> >> 
> >> >> Hello, 
> >> >> 
> >> >> I have a small question about Pandoc. 
> >> >> 
> >> >> Is there any plan to add the "Twiki Markup" language as an output 
> >> (writer) 
> >> >> option ? 
> >> >> 
> >> >> If not, do you think it is a big job to add it ? 
> >> >> Is there some kind of dictionnary or script to create if I want to 
> add 
> >> a 
> >> >> new output format ? 
> >> >> 
> >> >> Would it be a big task to modify dokuwiki format to Twiki ? (both 
> seems 
> >> >> rather similar..) 
> >> >> 
> >> >> Thanks for your input. 
> >> >> 
> >> > 
> >> > -- 
> >> > You received this message because you are subscribed to the Google 
> >> Groups "pandoc-discuss" group. 
> >> > To unsubscribe from this group and stop receiving emails from it, 
> send 
> >> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >> > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> >> <javascript:>. 
> >> > To view this discussion on the web visit 
> >> 
> https://groups.google.com/d/msgid/pandoc-discuss/2ba0d474-f0db-456e-922a-bb7282e60bf5%40googlegroups.com. 
>
> >> 
> >> > For more options, visit https://groups.google.com/d/optout. 
> >> 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "pandoc-discuss" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/5bffbda3-8281-4247-99c2-3826011ec9ca%40googlegroups.com. 
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8631e4f1-8744-40b4-a3ce-a8d8e1bb0202%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 9341 bytes --]

  parent reply	other threads:[~2018-12-11 18:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 20:29 ss infod
     [not found] ` <976a9019-374b-4cc9-b9cf-c2e98e04fed9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-02-25 21:38   ` John MacFarlane
     [not found]     ` <20170225213832.GA24756-l/d5Ua9yGnxXsXJlQylH7w@public.gmane.org>
2017-02-26 12:45       ` John MacFarlane
     [not found]         ` <20170226124512.GA28253-l/d5Ua9yGnxXsXJlQylH7w@public.gmane.org>
2018-11-29 15:00           ` Joey Dumont
     [not found]             ` <0dcc0aff-1e6c-4299-a99a-bacdf9535db1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-12-10 14:24               ` Joey Dumont
2018-12-10 16:28   ` Joey Dumont
     [not found]     ` <2ba0d474-f0db-456e-922a-bb7282e60bf5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-12-10 19:49       ` John MacFarlane
     [not found]         ` <yh480kmupdqi08.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-12-11 12:18           ` Joey Dumont
     [not found]             ` <5bffbda3-8281-4247-99c2-3826011ec9ca-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-12-11 18:48               ` John MacFarlane
     [not found]                 ` <yh480kbm5rj3vq.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-12-11 18:55                   ` Joey Dumont [this message]
     [not found]                     ` <8631e4f1-8744-40b4-a3ce-a8d8e1bb0202-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-12-11 19:04                       ` John MacFarlane
     [not found]                         ` <yh480k5zvzj352.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-12-12 13:03                           ` Joey Dumont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8631e4f1-8744-40b4-a3ce-a8d8e1bb0202@googlegroups.com \
    --to=joey.dumont-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).