I assume that your code is inside a Custom Component. In which <@component .../> will evaluate to something like this:
<div class="lia-paging-full-wrapper lia-component-common-widget-pager" class="lia-paging-full-wrapper" id="pager_147ee2d9505">
<div class="lia-inline-ajax-feedback">
<div class="AjaxFeedback" id="ajaxFeedback_147ee2d9505"></div>
</div>
<div class="lia-inline-ajax-feedback">
<div class="AjaxFeedback" id="ajaxFeedback_147ee2d9505"></div>
</div>
<ul class="lia-paging-full">
<li class="lia-paging-page-previous lia-component-previous" class="lia-paging-page-previous">
<span class="lia-link-navigation lia-js-data-pageNum-1 lia-link-disabled" id="link_0_147ee2d9505">
<span>
<span class="lia-paging-page-arrow">«</span>
<span class="lia-paging-page-link">Previous</span>
</span>
</span>
</li>
...
</ul>
</div>
When it gets to the browser, the source code will look like this:
$("mySelector").append('<div class="lia-paging-full-wrapper lia-component-common-widget-pager" class="lia-paging-full-wrapper" id="pager_147ee2d9505">
<div class="lia-inline-ajax-feedback">
<div class="AjaxFeedback" id="ajaxFeedback_147ee2d9505"></div>
</div>
...
</div>');
As you rightly speculate, JavaScript doesn't like having line breaks in string literals.
The solution depends on what you want to achieve. I'm guessing from the context that you want to inject the pagination into part of the page that you cannot edit (i.e. inside an in-built component).
One solution is to do something like this:
<div id='pagination_to_move' style='display: none'>
<@component id="common.widget.pager"/>
</div>
<@liaAddScript>
LITHIUM.jQuery("#pagination_to_move").detach().appendTo("mySelector");
LITHIUM.jQuery("#pagination_to_move").show();
</@liaAddScript>
With this approach, the pagination will be initially loaded inside a hidden div container. Then, when the page is loaded, jQuery will move the container to the appropriate place on the page, and unhide it.